Exemplo n.º 1
0
        public ListContacts()
        {
            ViewModel      = new ActivityPageViewModel();
            BindingContext = ViewModel;

            Task.Factory.StartNew(() => GetAccount());

            Loading = new ActivityIndicator
            {
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                Color             = Color.White,
                Opacity           = 5,
                IsVisible         = false
            };

            UserName = new Label
            {
                FontSize          = 16,
                Text              = "Bienvenido",
                TextColor         = Color.White,
                HorizontalOptions = LayoutOptions.StartAndExpand,
                VerticalOptions   = LayoutOptions.StartAndExpand
            };

            Content = new StackLayout {
                Padding  = 60,
                Spacing  = 10,
                Children = { Loading, UserName, }
            };

            Loading.SetBinding(ActivityIndicator.IsVisibleProperty, "IsBusy");
            Loading.SetBinding(ActivityIndicator.IsRunningProperty, "IsBusy");
        }
Exemplo n.º 2
0
        public ActivityPage(PageProperties properties)
        {
            BindingContext = new ActivityPageViewModel(properties);

            InitializeComponent();
        }