maui
maui copied to clipboard
When Shell.NavBarIsVisible="False" open and close the flyout programmatically is not working
Description
I want to create custom button to show and hide flyout, but when I hide navbar in xaml by "Shell.NavBarIsVisible="False" I can't programmaticaly do it by using "Shell.Current.FlyoutIsPresented = true/false"
Interesting fact: when I swipe, flyout opens and after that my custom button, that opens flyout programmaticaly, starts to work!
Steps to Reproduce
- Create app with flyout shell
- Hide it by "Shell.NavBarIsVisible="False"
- Try to use "Shell.Current.FlyoutIsPresented = true" to open flyout
Version with bug
6.0.400 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 11
Did you find any workaround?
No response
Relevant log output
No response
Same issue encountered on Android devices. I suggest Shell should have an option to let developer choose to make Hamburger Navigation Button visible on every page or not. Currently, if the back button is presented, flyout menu (Hamburger Navigation Button) doesn't show up on Android/iOS.
Still an issue in MAUI on .NET 7. Adding the following line:
Shell.Current.CurrentPage.Layout(new Rect(0, 0, Shell.Current.CurrentPage.Width + 1, Shell.Current.CurrentPage.Height + 1));
after Shell.Current.FlyoutIsPresented = true;
is still current workaround.
Encountering this with Shell.NavBarIsVisible="False"
set in my view.xaml (contentpage)
with a custom hamburger to trigger Shell.Current.FlyoutIsPresented = true
net7.0 in VS 17.6.5
@TheLankyScottishNerd This works great though thank you very much!
Verified this on Visual Studio Enterprise 17.8.0 Preview 2.0(8.0.0-rc.1.9171). Repro on Android 13.0-API33, not repro on Windows 11 and iOS 16.4 with below Project:
8532.zip
Hi @Ainur13. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.
You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.
This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.