示例#1
0
 public static void MapFlyoutHeader(ShellHandler handler, Shell view)
 {
     if (handler.PlatformView.PaneHeader == null)
     {
         handler.PlatformView.PaneHeader = new ShellHeaderView(view);
     }
 }
示例#2
0
 public static void MapFlyoutBackground(ShellHandler handler, Shell view)
 {
     handler.PlatformView.UpdatePaneBackground(
         !Brush.IsNullOrEmpty(view.FlyoutBackground) ?
         view.FlyoutBackground :
         view.FlyoutBackgroundColor?.AsPaint());
 }
示例#3
0
 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;
     }
 }
示例#4
0
        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);
        }
示例#5
0
 public static void MapFlyoutBackdrop(ShellHandler handler, Shell view)
 {
     if (Brush.IsNullOrEmpty(view.FlyoutBackdrop))
     {
         handler.PlatformView.FlyoutBackdrop = null;
     }
     else
     {
         handler.PlatformView.FlyoutBackdrop = view.FlyoutBackdrop;
     }
 }
示例#6
0
 public static void MapIsPresented(ShellHandler handler, IFlyoutView flyoutView)
 {
     handler.PlatformView.IsPaneOpen = flyoutView.IsPresented;
 }
示例#7
0
 public static void MapFlyout(ShellHandler handler, IFlyoutView flyoutView)
 {
     handler.PlatformView.FlyoutCustomContent = flyoutView.Flyout?.ToPlatform(handler.MauiContext);
 }
示例#8
0
 public static void MapFlyoutVerticalScrollMode(ShellHandler handler, Shell view)
 {
     handler.PlatformView.UpdateFlyoutVerticalScrollMode((WScrollMode)(int)view.FlyoutVerticalScrollMode);
 }
示例#9
0
 public static void MapCurrentItem(ShellHandler handler, Shell view)
 {
     handler.PlatformView.SwitchShellItem(view.CurrentItem, true);
 }
示例#10
0
 public static void MapFlyoutItems(ShellHandler handler, Shell view)
 {
     handler.PlatformView.UpdateMenuItemSource();
 }
示例#11
0
 public static void MapFlyoutBehavior(ShellHandler handler, IFlyoutView flyoutView)
 {
     handler.PlatformView.UpdateFlyoutBehavior(flyoutView);
 }
示例#12
0
 public static void MapFlyoutWidth(ShellHandler handler, IFlyoutView flyoutView)
 {
     handler.PlatformView.UpdateFlyoutWidth(flyoutView);
 }
示例#13
0
 public static void MapFlyout(ShellHandler handler, IFlyoutView flyoutView)
 {
     handler.PlatformView.ReplacePaneMenuItemsWithCustomContent(flyoutView.Flyout);
 }
示例#14
0
 public static void MapFlyoutHeaderBehavior(ShellHandler handler, Shell view)
 {
     handler.UpdateFlyoutHeaderBehavior(view);
 }