Skip to content

Shell Flyout appears in Release builds even when FlyoutBehavior="Disabled" (MacCatalyst) #32616

Closed as duplicate

Description

@lettucrisp

Description

On MacCatalyst, setting Shell.FlyoutBehavior to Disabled prevents the flyout as expected in Debug builds. However, in Release builds the flyout can still be revealed by dragging the Shell content area from left to right.

Image

Steps to Reproduce

  1. Create a new .NET MAUI
  2. Set the app Shell’s FlyoutBehavior to Disabled.
  3. Run the app in Release, and drag from the left edge of the content.

Link to public reproduction project repository

https://github.com/lettucrisp/maui_repro/tree/flyout-disabling

Version with bug

10.0.10

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.120 SR12

Affected platforms

macOS, I was not able test on other platforms

Affected platform versions

macOS 15

Did you find any workaround?

No response

Relevant log output

Activity

  1. added
    t/bug
    on Nov 14, 2025
  2. NafeelaNazhir commented on Nov 14, 2025

    @NafeelaNazhir
    Contributor

    This issue has been validated in Visual Studio Code 1.106.0 with MAUI versions (10.0.10, 10.0.0 , 10.0.0-rc2 and 10.0.0-preview1). It can be reproducible on Catalyst Platform in release mode. This issue does not reproduced in debug mode.

  3. added
    s/triaged
    s/verified
    platform/macos
    area-controls-shell
    on Nov 14, 2025
  4. borrmann commented on Nov 14, 2025

    @borrmann
    Contributor

    This also happens on iOS devices

  5. added
    i/regression
    on Nov 14, 2025
  6. added this to the .NET 10.0 SR1.1 milestone on Nov 14, 2025
  7. self-assigned this
    on Nov 15, 2025
  8. d2dyno1 commented on Nov 15, 2025

    @d2dyno1
    Contributor

    This is also present in iOS:

    trim.43204FD1-9DE8-469F-A061-35AE1D22000A.MOV
  9. jaysidri commented on Nov 16, 2025

    @jaysidri

    I can confirm that this issue is happening on iOS, but only on a physical device.

    It doesn't happen on the simulator.

    Setting FlyoutBehavior in the Shell's ctor instead of setting it in XAML:

    FlyoutBehavior = FlyoutBehavior.Disabled;

    ..seems to fix this.

  10. Matt-Mcl commented on Nov 18, 2025

    @Matt-Mcl

    @jaysidri

    Setting FlyoutBehavior in the Shell's ctor instead of setting it in XAML:

    FlyoutBehavior = FlyoutBehavior.Disabled;

    ..seems to fix this.

    This didn't seem to fix it for me sadly.. Using the below:

      public AppShell()
      {
          InitializeComponent();
          BindingContext = this;
    
          FlyoutBehavior = FlyoutBehavior.Disabled;
      }
    
  11. rolfbjarne commented on Nov 18, 2025

    @rolfbjarne
    Member

    This might be a duplicate of dotnet/macios#24262

    Try adding this to the csproj to see if fixes the problem:

    <PropertyGroup>
        <AppBundleExtraOptions>--optimize=-register-protocols</AppBundleExtraOptions>
    </PropertyGroup>
  12. lettucrisp commented on Nov 19, 2025

    @lettucrisp
    Author

    #32616 (comment)
    Adding that to the csproj fixed the issue. Thank you.

  13. michaelshodamola commented on Dec 1, 2025

    @michaelshodamola

    This fix the issue for me on iOS devices:

    Create a custom shell renderer in platform/IOS:

    public class CustomShellRenderer : ShellRenderer
    {
        IShellFlyoutRenderer flyoutRenderer;
    
        protected override IShellFlyoutRenderer CreateFlyoutRenderer()
        {
            flyoutRenderer = base.CreateFlyoutRenderer();
            return flyoutRenderer;
        }
    
        public override void ViewWillAppear(bool animated)
        {
            base.ViewWillAppear(animated);
            var type = flyoutRenderer.GetType();
            var property = type.GetProperty("PanGestureRecognizer", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
            var value = property?.GetValue(flyoutRenderer);
    
            var recognizer = value as UIPanGestureRecognizer;
            recognizer?.Enabled = false;
        }
    }
    

    Then register it in maui:

    #if IOS
            builder.ConfigureMauiHandlers(handlers =>
            {
                handlers.AddHandler(typeof(Shell), typeof(CustomShellRenderer));
            });
    #endif
    
  14. locked and limited conversation to collaborators on Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-controls-shelli/regressionplatform/macosregressed-in-10.0.0s/triageds/verifiedt/bug

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions