示例#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
 public static void SendClicked(this UICommand uICommand)
 {
     MenuFlyoutItemHandler.Execute(uICommand);
 }