public static void MapIsPresented(ShellHandler handler, IFlyoutView flyoutView) { // WinUI Will close the pane inside of the apply template code // so we wait until the control is loaded before applying IsPresented if (handler.PlatformView.IsLoaded) { handler.PlatformView.IsPaneOpen = flyoutView.IsPresented; } }
public static void MapFlyout(ShellHandler handler, IFlyoutView flyoutView) { if (handler.PlatformView is RootNavigationView rnv) { rnv.FlyoutView = flyoutView.Flyout; } handler.PlatformView.FlyoutCustomContent = flyoutView.Flyout?.ToPlatform(handler.MauiContext); }
public static void UpdateFlyoutWidth(this MauiNavigationView navigationView, IFlyoutView flyoutView) { if (flyoutView.FlyoutWidth >= 0) { navigationView.OpenPaneLength = flyoutView.FlyoutWidth; } else { navigationView.OpenPaneLength = 320; } // At some point this Template Setting is going to show up with a bump to winui //handler.PlatformView.OpenPaneLength = handler.PlatformView.TemplateSettings.OpenPaneWidth; }
public static void MapIsPresented(ShellHandler handler, IFlyoutView flyoutView) { handler.PlatformView.IsPaneOpen = flyoutView.IsPresented; }
public static void MapFlyout(ShellHandler handler, IFlyoutView flyoutView) { handler.PlatformView.FlyoutCustomContent = flyoutView.Flyout?.ToPlatform(handler.MauiContext); }
public static void MapFlyoutBehavior(ShellHandler handler, IFlyoutView flyoutView) { handler.PlatformView.UpdateFlyoutBehavior(flyoutView); }
public static void MapFlyoutWidth(ShellHandler handler, IFlyoutView flyoutView) { handler.PlatformView.UpdateFlyoutWidth(flyoutView); }
public static void UpdateFlyoutBehavior(this MauiNavigationView navigationView, IFlyoutView flyoutView) { switch (flyoutView.FlyoutBehavior) { case FlyoutBehavior.Flyout: navigationView.IsPaneToggleButtonVisible = true; // Workaround for // https://github.com/microsoft/microsoft-ui-xaml/issues/6493 navigationView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftCompact; navigationView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftMinimal; break; case FlyoutBehavior.Locked: navigationView.PaneDisplayMode = NavigationViewPaneDisplayMode.Left; navigationView.IsPaneToggleButtonVisible = false; break; case FlyoutBehavior.Disabled: navigationView.PaneDisplayMode = NavigationViewPaneDisplayMode.LeftMinimal; navigationView.IsPaneToggleButtonVisible = false; navigationView.IsPaneOpen = false; break; } }
public static void MapFlyout(ShellHandler handler, IFlyoutView flyoutView) { handler.PlatformView.ReplacePaneMenuItemsWithCustomContent(flyoutView.Flyout); }
public void SetCurrentFlyoutView(IFlyoutView flyoutView) { throw new System.NotImplementedException(); }
public void SetCurrentFlyoutView(IFlyoutView flyoutView) { _currentFlyoutPage = flyoutView; }