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