コード例 #1
0
 public static void MapToolbar(WindowHandler handler, IWindow view)
 {
     if (view is IToolbarElement tb)
     {
         ViewHandler.MapToolbar(handler, tb);
     }
 }
コード例 #2
0
        public static void MapContent(WindowHandler handler, IWindow window)
        {
            _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class.");

            var nativeContent = window.Content.ToUIViewController(handler.MauiContext);

            handler.NativeView.RootViewController = nativeContent;
        }
コード例 #3
0
        public static void MapContent(WindowHandler handler, IWindow window)
        {
            _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class.");

            var nativeContent = window.Content.ToContainerView(handler.MauiContext);

            handler.NativeView.SetContentView(nativeContent);
        }
コード例 #4
0
        public static void MapContent(WindowHandler handler, IWindow window)
        {
            _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class.");

            var nativeContent = window.Content.ToNative(handler.MauiContext);

            handler?._rootPanel?.Children?.Clear();
            handler?._rootPanel?.Children?.Add(nativeContent);
        }
コード例 #5
0
        public static void MapToolbar(WindowHandler handler, IWindow view)
        {
            _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(handler.MauiContext)} null");

            if (view is IToolbarElement tb && tb.Toolbar != null)
            {
                _ = tb.Toolbar.ToNative(handler.MauiContext);
            }
        }
コード例 #6
0
        public static void MapContent(WindowHandler handler, IWindow window)
        {
            _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class.");

            var nativeContent = window.Content.ToUIViewController(handler.MauiContext);

            handler.NativeView.RootViewController = nativeContent;

            if (window.VisualDiagnosticsOverlay != null)
            {
                window.VisualDiagnosticsOverlay.Initialize();
            }
        }
コード例 #7
0
        public static void MapContent(WindowHandler handler, IWindow window)
        {
            _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class.");

            var rootManager = handler.MauiContext.GetNavigationRootManager();

            rootManager.Connect(window.Content);
            handler.NativeView.SetContentView(rootManager.RootView);
            if (window.VisualDiagnosticsOverlay != null && rootManager.RootView is ViewGroup group)
            {
                window.VisualDiagnosticsOverlay.Initialize();
            }
        }
コード例 #8
0
        public static void MapContent(WindowHandler handler, IWindow window)
        {
            _ = handler.MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class.");

            var windowManager = handler.MauiContext.GetNavigationRootManager();

            windowManager.Connect(handler.VirtualView.Content);
            handler?._rootPanel?.Children?.Clear();

            handler?._rootPanel?.Children?.Add(windowManager.RootView);

            if (window.VisualDiagnosticsOverlay != null && handler?._rootPanel != null)
            {
                window.VisualDiagnosticsOverlay.Initialize();
            }
        }
コード例 #9
0
 public static void MapTitle(WindowHandler handler, IWindow window)
 {
 }
コード例 #10
0
 public static void MapTitle(WindowHandler handler, IWindow window) =>
 handler.NativeView?.UpdateTitle(window);
コード例 #11
0
ファイル: WindowHandler.Android.cs プロジェクト: hevey/maui
 public static void MapToolbar(WindowHandler handler, IWindow view)
 {
     handler.UpdateToolbar();
 }
コード例 #12
0
 public static void MapContent(WindowHandler handler, IWindow window)
 {
 }