maui icon indicating copy to clipboard operation
maui copied to clipboard

When Shell.NavBarIsVisible="False" open and close the flyout programmatically is not working

Open Ainur13 opened this issue 2 years ago • 1 comments

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

  1. Create app with flyout shell
  2. Hide it by "Shell.NavBarIsVisible="False"
  3. 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

Ainur13 avatar Jul 05 '22 10:07 Ainur13

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.

SunshineSpring666 avatar Nov 25 '22 03:11 SunshineSpring666

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.

TheLankyScottishNerd avatar Feb 10 '23 02:02 TheLankyScottishNerd

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!

jeff-eats-pubsubs avatar Jul 28 '23 13:07 jeff-eats-pubsubs

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 Flyout

Same with the Shell: Cannot open shell flyout when initial page has Navbar hidden (NavBarIsVisible="False") - Android · Issue #16927 · dotnet/maui (github.com)

XamlTest avatar Sep 28 '23 01:09 XamlTest

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.