A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
HOW TO GENERATE A TAPPED EVENT PROGRAMMATICALLY
Is it possible to "send" programmatically a Tapped event to a ContentPage?
i.e. simulate that the user tapped somewhere.
the platform is Android.
In my ContentPage I set HideSoftInputOnTapped="True"
There is an Entry:
<Entry x:Name="entryField"
...
IsReadOnly="True">
<Entry.GestureRecognizers>
<TapGestureRecognizer Tapped="OnFieldTapped" />
</Entry.GestureRecognizers>
</Entry>
It is read-only to prevent that tapping on it opens the soft keyboard.
Scenario:
- another field has its soft keyboard open;
- tapping anywhere will close it - this is the behavior that I want, BUT:
- tapping on the Entry above, the event is captured in my GestureRecognizer and does not close the existing soft keyboard.
The solution I envisage is: in my OnFieldTapped I forward the tapped event to the ContentPage or to any other element, to let the system close the software keyboard.
Developer technologies | .NET | .NET Multi-platform App UI
1 answer
Sort by: Most helpful
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
1 deleted comment
Comments have been turned off. Learn more