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

Entry password when centered is not working #17

@cfb11

Description

@cfb11

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;

        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions