Shrinking text field when typing


I am trying to insert a Cancel button and shrink the text field when the user input a text, but I did not find the proper handler for that. Does anyone have an idea about the issue?

I want to add the Cancel Button here when the user input something, just like the Safari one:


I realize this is an old post, but there are now focusLost and textChanged events you can subscribe to. More info in this issue:


create stackLayout with Horizontal orientation set id of it.
ontextChanged of textbox you can add button to that layout dynamically and handle that button’s tap event.