Entry Cursor not appearing when set in button's clicked event handler Xamarin forms

214 Views Asked by At

I have an entry that's IsVisible property is set to false. Then I have a button that has a clicked event handler that sets the entry IsVisible to true and sets the focus and cursor position of the entry. The entry_focused event handler is fired, but there is no focus /cursor on the entry and no keyboard appears.

Here is the Button_Clicked event handler:

 void Button_Clicked(System.Object sender, System.EventArgs e)
 {
     //doesn't show cursor
     AmntEntry.IsVisible = true;
     AmntEntry.Focus();
     AmntEntry.CursorPosition = 2;
 }

Please let me know how to fix this. Thanks

0

There are 0 best solutions below