コード例 #1
0
        public override void BuildMenu(IUIMenuBuilder builder)
        {
            MenuFlyoutItemHandler.Reset();

            base.BuildMenu(builder);

            MenuBuilder = builder;

            var window = Window ?? this.GetWindow() ??
                         UIApplication.SharedApplication.GetWindow()?.Handler?.PlatformView as UIWindow;

            window?.GetWindow()?.Handler?.UpdateValue(nameof(IMenuBarElement.MenuBar));

            MenuBuilder = null;
        }
コード例 #2
0
        public override void BuildMenu(IUIMenuBuilder builder)
        {
            MenuFlyoutItemHandler.Reset();

            base.BuildMenu(builder);

            if (!OperatingSystem.IsIOSVersionAtLeast(13))
            {
                return;
            }

            MenuBuilder = builder;

            var window = Window ?? this.GetWindow() ??
                         UIApplication.SharedApplication.GetWindow()?.Handler?.PlatformView as UIWindow;

            window?.GetWindow()?.Handler?.UpdateValue(nameof(IMenuBarElement.MenuBar));

            MenuBuilder = null;
        }
コード例 #3
0
ファイル: MenuExtensions.cs プロジェクト: dimonovdd/maui
 public static void SendClicked(this UICommand uICommand)
 {
     MenuFlyoutItemHandler.Execute(uICommand);
 }