Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }