You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In .Net Maui for Android, when you click on page outside the shell Flyout, the flyout hides. In the windows platform you have to click in the hamburger icon to hide the flyout.
I tried the code bellow to add a gesture recognizer to all the pages and hide the flyout in a tap event.
The problem is the page object does not support: GestureRecognizers.Add . What alternatives do I have? Please advise.
Application.Current.PageAppearing += OnPageAppearing;
private void OnPageAppearing(object sender, Page e)
{
if (e is ContentPage)
{
var tapGestureRecognizer = new TapGestureRecognizer();
tapGestureRecognizer.Tapped += (s, e) => {
if (Shell.Current.FlyoutIsPresented == true)
Shell.Current.FlyoutIsPresented = false;
};
//e.GestureRecognizers.Add(tapGestureRecognizer);
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In .Net Maui for Android, when you click on page outside the shell Flyout, the flyout hides. In the windows platform you have to click in the hamburger icon to hide the flyout.
I tried the code bellow to add a gesture recognizer to all the pages and hide the flyout in a tap event.
The problem is the page object does not support: GestureRecognizers.Add . What alternatives do I have? Please advise.
Beta Was this translation helpful? Give feedback.
All reactions