public static void MapIsPresented(IFlyoutViewHandler handler, IFlyoutView flyoutView) { if (handler is FlyoutViewHandler platformHandler) { platformHandler.UpdateIsPresented(); } }
public static void MapIsGestureEnabled(IFlyoutViewHandler handler, IFlyoutView view) { if (handler is FlyoutViewHandler platformHandler) { platformHandler.UpdateFlyoutBehavior(); } }
public static void MapDetail(IFlyoutViewHandler handler, IFlyoutView flyoutView) { if (handler is FlyoutViewHandler platformHandler) { platformHandler.UpdateDetail(); } }
public static void MapFlyoutBehavior(IFlyoutViewHandler handler, IFlyoutView flyoutView) { if (handler is FlyoutViewHandler platformHandler) { platformHandler.UpdateFlyoutBehavior(); } }
static void UpdateFlyout(IFlyoutViewHandler handler) { _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class."); _ = handler.VirtualView.Flyout.ToPlatform(handler.MauiContext); handler.PlatformView.ReplacePaneMenuItemsWithCustomContent(handler.VirtualView.Flyout); }
static void UpdateDetail(IFlyoutViewHandler handler) { _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class."); _ = handler.VirtualView.Detail.ToPlatform(handler.MauiContext); handler.PlatformView.Content = handler.VirtualView.Detail.ToPlatform(); }
public static void MapToolbar(IFlyoutViewHandler handler, IFlyoutView view) { ViewHandler.MapToolbar(handler, view); if (handler is FlyoutViewHandler platformHandler && handler.VirtualView.FlyoutBehavior == FlyoutBehavior.Flyout && handler.VirtualView is IToolbarElement te && te.Toolbar?.Handler is ToolbarHandler th) { th.SetupWithDrawerLayout(platformHandler.DrawerLayout); } }
static void UpdateFlyout(IFlyoutViewHandler handler) { _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class."); _ = handler.VirtualView.Flyout.ToPlatform(handler.MauiContext); if (handler.PlatformView is RootNavigationView rnv) { rnv.FlyoutView = handler.VirtualView.Flyout; } handler.PlatformView.FlyoutCustomContent = handler.VirtualView.Flyout?.ToPlatform(handler.MauiContext); }
public static void MapFlyoutWidth(IFlyoutViewHandler handler, IFlyoutView flyoutView) { if (handler is FlyoutViewHandler platformHandler) { var nativeFlyoutView = platformHandler._flyoutView; if (nativeFlyoutView?.LayoutParameters == null) { return; } nativeFlyoutView.LayoutParameters.Width = (int)platformHandler.FlyoutWidth; } }
public static void MapFlyoutWidth(IFlyoutViewHandler handler, IFlyoutView flyoutView) { if (flyoutView.Width >= 0) { handler.PlatformView.OpenPaneLength = flyoutView.Width; } else { handler.PlatformView.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 MapIsGestureEnabled(IFlyoutViewHandler handler, IFlyoutView view) { }
public static void MapFlyoutBehavior(IFlyoutViewHandler handler, IFlyoutView flyoutView) { handler.PlatformView.UpdateFlyoutBehavior(flyoutView); }
public static void MapIsPresented(IFlyoutViewHandler handler, IFlyoutView flyoutView) { handler.PlatformView.IsPaneOpen = flyoutView.IsPresented; }
public static void MapFlyout(IFlyoutViewHandler handler, IFlyoutView flyoutView) { UpdateFlyout(handler); }
public static void MapDetail(IFlyoutViewHandler handler, IFlyoutView flyoutView) { UpdateDetail(handler); }