예제 #1
0
        public HomePage(string username) : base("HomePage")
        {
            _mainScroll = new ScrollView {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand
            };

            this.Content = _mainScroll;

            _mainStack = new StackLayout {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand
            };
            _mainScroll.Content = _mainStack;

            _homepageTitle = new Label {
                Text = "Welcome, " + username + "!",
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };
            _mainStack.Children.Add(_homepageTitle);

            _next = new Views.TrackingButton(this.Title)
            {
                Text = "Next",
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };
            _next.Clicked += Next_Clicked;

            _mainStack.Children.Add(_next);
        }
예제 #2
0
        public HomePage(string username)
            : base("HomePage")
        {
            _mainScroll = new ScrollView {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand
            };

            this.Content = _mainScroll;

            _mainStack = new StackLayout{
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand
            };
            _mainScroll.Content = _mainStack;

            _homepageTitle = new Label {
                Text = "Welcome, " + username + "!",
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };
            _mainStack.Children.Add (_homepageTitle);

            _next = new Views.TrackingButton(this.Title) {
                Text = "Next",
                HorizontalOptions = LayoutOptions.CenterAndExpand
            };
            _next.Clicked += Next_Clicked;

            _mainStack.Children.Add (_next);
        }