예제 #1
0
        public WelcomePage()
        {
            InitializeComponent();
            BindingContext = new WelcomeViewModel();

            PopulateAutomationIDs();
            PopulatePlaceholderText();
            ConfigureCustomReturnEffect();

            NavigationPage.SetBackButtonTitle(this, "");
        }
예제 #2
0
        public WelcomePage()
        {
            var welcomeViewModel = new WelcomeViewModel();

            BindingContext = welcomeViewModel;

            var player1Label = new DarkBlueLabel {
                Text = "Player 1"
            };
            var player2Label = new DarkBlueLabel {
                Text = "Player 2"
            };

            _player1Entry = new Entry();
            _player1Entry.SetBinding(Entry.TextProperty, nameof(welcomeViewModel.Player1));

            _player2Entry = new Entry();
            _player2Entry.SetBinding(Entry.TextProperty, nameof(welcomeViewModel.Player2));

            _startGameButton = new BounceButton
            {
                Margin = new Thickness(0, 20, 0, 0),
                Text   = "Start"
            };

            PopulateAutomationIDs();
            PopulatePlaceholderText();
            ConfigureCustomReturnEffect();

            NavigationPage.SetBackButtonTitle(this, "");

            Title           = "Face Off";
            BackgroundColor = Color.FromHex("#91E2F4");

            Content = new ScrollView
            {
                Content = new StackLayout
                {
                    Padding  = 20,
                    Children =
                    {
                        player1Label,
                        _player1Entry,
                        player2Label,
                        _player2Entry,
                        _startGameButton
                    }
                }
            };
        }