Beispiel #1
0
        private void SetupUserInterface()
        {
            BackgroundColor = Colors.BackgroundColor;
            NavigationPage.SetHasNavigationBar(this, false);

            cancelButton = new Image {
                Source            = Images.CancelButton,
                HorizontalOptions = LayoutOptions.Start,
                HeightRequest     = 25,
                WidthRequest      = 25
            };

            topLayout = new StackLayout {
                Children = { cancelButton },
                Padding  = new Thickness(15, 15, 0, 0)
            };

            addFriendLabel = new Label {
                Style = Application.Current.Resources["MainLabelStyle"] as Style,
                Text  = Strings.AddAFriend
            };

            usernameEntry = new MomentsEntry {
                Placeholder   = Strings.Username,
                HeightRequest = 45
            };

            becomeFriendsButton = new Button {
                BackgroundColor = Colors.ButtonBackgroundColor,
                BorderRadius    = 0,
                BorderWidth     = 0,
                FontAttributes  = FontAttributes.None,
                FontFamily      = Fonts.HelveticaNeueThin,
                FontSize        = 25,
                Text            = Strings.BecomeFriends,
                TextColor       = Colors.ButtonTextColor
            };

            mainLayout = new StackLayout {
                Children = { topLayout, addFriendLabel, usernameEntry, becomeFriendsButton },
                Spacing  = 25
            };

            Content = mainLayout;
        }
Beispiel #2
0
        private void SetupUserInterface()
        {
            BackgroundColor = Colors.BackgroundColor;
            NavigationPage.SetHasNavigationBar(this, false);

            cancelButton = new Image {
                Source            = Images.CancelButton,
                HorizontalOptions = LayoutOptions.Start,
                HeightRequest     = 30,
                WidthRequest      = 30
            };

            topLayout = new StackLayout {
                Children = { cancelButton },
                Padding  = new Thickness(15, 15, 0, 0)
            };

            signUpLabel = new Label {
                Style = Application.Current.Resources["MainLabelStyle"] as Style,
                Text  = Strings.SignUp
            };

            firstNameEntry = new MomentsEntry {
                Keyboard      = Keyboard.Text,
                Placeholder   = Strings.First,
                HeightRequest = 45,
                WidthRequest  = 159
            };

            verticalSeparator = new Image {
                BackgroundColor = Colors.SeparatorColor,
                HeightRequest   = 45,
                WidthRequest    = 1
            };

            lastNameEntry = new MomentsEntry {
                Keyboard      = Keyboard.Text,
                Placeholder   = Strings.Last,
                HeightRequest = 45,
                WidthRequest  = 160
            };

            firstMiddleRowLayout = new StackLayout {
                Children    = { firstNameEntry, verticalSeparator, lastNameEntry },
                Spacing     = 0,
                Orientation = StackOrientation.Horizontal
            };

            separator = new Image {
                BackgroundColor = Colors.SeparatorColor,
                HeightRequest   = 1,
                WidthRequest    = this.Width
            };

            usernameEntry = new MomentsEntry {
                Placeholder   = Strings.Username,
                HeightRequest = 45
            };

            separatorTwo = new Image {
                BackgroundColor = Colors.SeparatorColor,
                HeightRequest   = 1,
                WidthRequest    = this.Width
            };

            passwordEntry = new MomentsEntry {
                Placeholder   = Strings.Password,
                HeightRequest = 45,
                IsPassword    = true
            };

            separatorThree = new Image {
                BackgroundColor = Colors.SeparatorColor,
                HeightRequest   = 1,
                WidthRequest    = this.Width
            };

            emailEntry = new MomentsEntry {
                Keyboard      = Keyboard.Email,
                Placeholder   = Strings.Email,
                HeightRequest = 45
            };

            bottomLayout = new StackLayout {
                Children = { firstMiddleRowLayout, separator, usernameEntry, separatorTwo, passwordEntry, separatorThree, emailEntry },
                Spacing  = 0
            };

            signUpButton = new Button {
                BackgroundColor = Colors.ButtonBackgroundColor,
                BorderRadius    = 0,
                BorderWidth     = 0,
                Command         = ViewModel.SignUpUserCommand,
                FontAttributes  = FontAttributes.None,
                FontFamily      = Fonts.HelveticaNeueThin,
                FontSize        = 25,
                Text            = Strings.SignUp,
                TextColor       = Colors.ButtonTextColor
            };

            mainLayout = new StackLayout {
                Children = { topLayout, signUpLabel, bottomLayout, signUpButton },
                Spacing  = 25
            };

            Content = mainLayout;
        }
Beispiel #3
0
        private void SetupUserInterface()
        {
            BackgroundColor = Colors.BackgroundColor;
            NavigationPage.SetHasNavigationBar(this, false);

            cancelButton = new Image {
                Source            = Images.CancelButton,
                HorizontalOptions = LayoutOptions.Start,
                HeightRequest     = 30,
                WidthRequest      = 30
            };

            topLayout = new StackLayout {
                Children = { cancelButton },
                Padding  = new Thickness(15, 15, 0, 0)
            };

            signInLabel = new Label {
                Style = Application.Current.Resources["MainLabelStyle"] as Style,
                Text  = Strings.SignIn
            };

            usernameEntry = new MomentsEntry {
                Placeholder   = Strings.Username,
                HeightRequest = 45
            };

            separator = new Image {
                BackgroundColor = Colors.SeparatorColor,
                HeightRequest   = 1,
                WidthRequest    = this.Width
            };

            passwordEntry = new MomentsEntry {
                Placeholder   = Strings.Password,
                HeightRequest = 45,
                IsPassword    = true
            };

            middleLayout = new StackLayout {
                Children = { usernameEntry, separator, passwordEntry },
                Spacing  = 0
            };

            signInButton = new Button {
                BackgroundColor = Colors.ButtonBackgroundColor,
                BorderRadius    = 0,
                BorderWidth     = 0,
                Command         = ViewModel.SignInUserCommand,
                FontAttributes  = FontAttributes.None,
                FontFamily      = Fonts.HelveticaNeueThin,
                FontSize        = 25,
                Text            = Strings.SignIn,
                TextColor       = Colors.ButtonTextColor
            };

            mainLayout = new StackLayout {
                Children = { topLayout, signInLabel, middleLayout, signInButton },
                Spacing  = 25
            };

            Content = mainLayout;
        }