Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Entry password when centered is not working #17

Open
cfb11 opened this issue Oct 25, 2019 · 0 comments
Open

Entry password when centered is not working #17

cfb11 opened this issue Oct 25, 2019 · 0 comments

Comments

@cfb11
Copy link

cfb11 commented Oct 25, 2019

Hello,
Whenever I centered the Entry Password object (in a Grid, StackLayout, and so on), the keyboard to type the password is not displayed.
This only happens when I try to center the Entry password object or put it on the right side of UI.
Code:

public LoginPage()
        {
            InitializeComponent();

            BindingContext = new LoginPageViewModel();
           

            EnhancedEntry passwordEntry = new EnhancedEntry
            {
                BorderColor = Color.Red,
                LeftIcon = "password",
                BorderWidth = 1,
                CornerRadius = 2,
                Placeholder = "Password",
                Effects = { new ShowHiddenEntryEffect() },
                IsPassword = true,
                ReturnKeyType = ReturnKeyTypes.Next
            };

            var grid = new Grid
            {
                VerticalOptions = LayoutOptions.Center, BackgroundColor = Color.Aqua
            };
            grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
            grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
            grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
            grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
            grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
            
            grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
            grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
            grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(1, GridUnitType.Star) });
            grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
            grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1,GridUnitType.Star) });
            grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
            grid.Children.Add(passwordEntry, 1,1);
           

            LoginView.Content = grid;

        }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant