protected override VisualElement Create(XNode node)
        {
            var enhancedActivityIndicatorLabel = new Label
            {
                Text   = "This is a Geocortex Mobile enhanced activity indicator.",
                Margin = new Thickness(10, 0)
            };

            var enhancedActivityIndicator = new EnhancedActivityIndicator()
            {
                IsRunning     = true,
                HeightRequest = 75,
                WidthRequest  = 75,
                Margin        = new Thickness(10, 0, 10, 10)
            };

            var enhancedButton = new EnhancedButton()
            {
                Text   = "Geocortex Mobile button",
                Margin = 10
            };

            var enhancedEntry = new EnhancedEntry()
            {
                Placeholder = "This is a Geocortex Mobile enhanced entry.",
                Margin      = 10
            };

            var enhancedSwitchLabel = new Label
            {
                Text   = "This is a Geocortex Mobile enhanced switch.",
                Margin = new Thickness(10, 0)
            };

            var enhancedSwitch = new EnhancedSwitch()
            {
                Margin = new Thickness(10, 0, 10, 10)
            };

            var view = new StackLayout
            {
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.Center,
                Children          =
                {
                    enhancedActivityIndicatorLabel,
                    enhancedActivityIndicator,
                    enhancedButton,
                    enhancedEntry,
                    enhancedSwitchLabel,
                    enhancedSwitch,
                }
            };

            return(view);
        }
Ejemplo n.º 2
0
        public CustomFormComponent(Geocortex.Workflow.Runtime.Definition.Forms.Element element, string name)
            : base(element, name)
        {
            _view = new EnhancedActivityIndicator()
            {
                IsRunning     = true,
                HeightRequest = 75,
                WidthRequest  = 75,
                Margin        = 10
            };

            Add(new GenericComponent(_view));
        }
Ejemplo n.º 3
0
        public View GetContent()
        {
            // Stack
            var stack = new StackLayout
            {
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.Center,
                Spacing           = 15
            };

            // Spinner
            var spinner = new EnhancedActivityIndicator()
            {
                IsRunning = true
            };

            spinner.WidthRequest  = 75;
            spinner.HeightRequest = 75;
            stack.Children.Add(spinner);

            // Label
            var label = new Label()
            {
                TextColor = Color.Black
            };

            stack.Children.Add(label);

            void ShowStatus(object sender, LoadingEventArgs e)
            {
                if (GlobalConfiguration.Instance.StartupLoadStatus)
                {
                    label.Text = e.LoadAction;
                }
                else
                {
                    LoadingAction -= ShowStatus;
                }
            }

            LoadingAction += ShowStatus;

            return(stack);
        }