Ejemplo n.º 1
0
        private void Menu_Opening(object sender, object e)
        {
            CommandBarFlyout myFlyout = sender as CommandBarFlyout;

            if (myFlyout != null && myFlyout.Target == REBCustom)
            {
                AppBarButton myButton = new AppBarButton
                {
                    Command = new StandardUICommand(StandardUICommandKind.Share)
                };
                myFlyout.PrimaryCommands.Add(myButton);
            }
            else
            {
                muxc.CommandBarFlyout muxFlyout = sender as muxc.CommandBarFlyout;
                if (muxFlyout != null && muxFlyout.Target == REBCustom)
                {
                    AppBarButton myButton = new AppBarButton
                    {
                        Command = new StandardUICommand(StandardUICommandKind.Share)
                    };
                    muxFlyout.PrimaryCommands.Add(myButton);
                }
            }
        }
        protected override void OnApplyTemplate()
        {
            MainWebView = GetTemplateChild("MainWebView") as WebView;
            MainWebView.ScriptNotify += MainWebView_ScriptNotify;

            _contextMenuFlyout = GetTemplateChild("ContextMenuFlyout") as CommandBarFlyout;

            base.OnApplyTemplate();
        }
Ejemplo n.º 3
0
        private void OnCommandBarFlyoutButtonClick(object sender, RoutedEventArgs e)
        {
            Button button = (Button)sender;

            CommandBarFlyout.ShowAt(button, new FlyoutShowOptions()
            {
                Placement = FlyoutPlacementMode.BottomEdgeAlignedLeft
            });
        }
Ejemplo n.º 4
0
        private void ContextFlyout_Opening(object sender, object e)
        {
            CommandBarFlyout myFlyout = sender as CommandBarFlyout;

            if (myFlyout.Target == REBCustom)
            {
                AppBarButton myButton = new AppBarButton();
                myButton.Command = new StandardUICommand(StandardUICommandKind.Share);
                myFlyout.PrimaryCommands.Add(myButton);
            }
        }
Ejemplo n.º 5
0
 public CommandBarFlyoutPage()
 {
     InitializeComponent();
     CommandBarFlyout1 = (CommandBarFlyout)Resources[nameof(CommandBarFlyout1)];
 }
 internal void SetOwningFlyout(
     CommandBarFlyout owningFlyout)
 {
     m_owningFlyout = new WeakReference <CommandBarFlyout>(owningFlyout);
 }