Exemplo n.º 1
0
        private void ShowMenu(bool isTransient)
        {
            FlyoutShowOptions myOption = new FlyoutShowOptions();

            myOption.ShowMode = isTransient ? FlyoutShowMode.Transient : FlyoutShowMode.Standard;
            CommandBarFlyout1.ShowAt(Image1, myOption);
        }
Exemplo n.º 2
0
        private void ShowMenu(bool isTransient, FrameworkElement fe)
        {
            FlyoutShowOptions myOption = new FlyoutShowOptions();

            myOption.ShowMode = isTransient ? FlyoutShowMode.Transient : FlyoutShowMode.Standard;
            CommandBarFlyout1.ShowAt(fe, myOption);
        }
        public void ShowMenu(bool isTransient, FrameworkElement fe)
        {
            FlyoutShowOptions myOption = new FlyoutShowOptions();

            myOption.ShowMode  = isTransient ? FlyoutShowMode.Transient : FlyoutShowMode.Standard;
            myOption.Placement = FlyoutPlacementMode.Bottom;
            CommandBarFlyout1.ShowAt(fe, myOption);
        }
Exemplo n.º 4
0
        //private void ShowMenu(bool isTransient, UIElement sender)
        //{
        //    FlyoutShowOptions myOption = new FlyoutShowOptions();
        //    myOption.ShowMode = isTransient ? FlyoutShowMode.Transient : FlyoutShowMode.Standard;
        //    CommandBarFlyout1.ShowAt(sender, myOption);
        //}


        //private void CalListView_ContextRequested(UIElement sender, Windows.UI.Xaml.Input.ContextRequestedEventArgs args)
        //{
        //    ShowMenu(true, sender);
        //}

        private void CalListView_RightTapped(object sender, Windows.UI.Xaml.Input.RightTappedRoutedEventArgs e)
        {
            var    framework   = (FrameworkElement)e.OriginalSource;
            Object dataContext = framework.DataContext;

            if (dataContext != null && framework.GetType() == typeof(ListViewItemPresenter))
            {
                CommandBarFlyout1.ShowAt(framework);
            }
        }
Exemplo n.º 5
0
        private void ShowMenu(bool isTransient, object sender)
        {
            var myOption = new FlyoutShowOptions();

            myOption.ShowMode = isTransient ? FlyoutShowMode.Transient : FlyoutShowMode.Standard;
            if (sender != null)
            {
                CommandBarFlyout1.ShowAt(sender as Image, myOption);
            }
        }
        private void ShowMenu(bool isTransient, FrameworkElement fe)
        {
            Word_SelectedHistoryItem.Text = ViewModel.SelectedWordHistoryModel.Word;
            //TranslationMode_SelectedHistoryItem.Text = ViewModel.SelectedWordHistoryModel.TranslationMode;
            ViewModel.UpdateDetailedInfo(ViewModel.SelectedWordHistoryModel);

            FlyoutShowOptions myOption = new FlyoutShowOptions();

            myOption.ShowMode = isTransient ? FlyoutShowMode.Transient : FlyoutShowMode.Standard;
            CommandBarFlyout1.ShowAt(fe, myOption);
        }
Exemplo n.º 7
0
 private void ShowMenu(bool isTransient)
 {
     if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))
     {
         FlyoutShowOptions myOption = new FlyoutShowOptions();
         myOption.ShowMode  = isTransient ? FlyoutShowMode.Transient : FlyoutShowMode.Standard;
         myOption.Placement = FlyoutPlacementMode.RightEdgeAlignedTop;
         CommandBarFlyout1.ShowAt(Image1, myOption);
     }
     else
     {
         CommandBarFlyout1.ShowAt(Image1);
     }
 }
        public void Image_PointerReleased(object sender, PointerRoutedEventArgs args)
        {
            myImageBorder.BorderBrush = new SolidColorBrush(Colors.Blue);

            if (wasLeftPointerPressed)
            {
                if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 7))
                {
                    FlyoutShowOptions myOption = new FlyoutShowOptions();
                    myOption.ShowMode  = FlyoutShowMode.Transient;
                    myOption.Placement = FlyoutPlacementMode.RightEdgeAlignedTop;
                    CommandBarFlyout1.ShowAt(Image1, myOption);
                }
                else
                {
                    CommandBarFlyout1.ShowAt(Image1);
                }
                wasLeftPointerPressed = false;
            }
            args.Handled = true;
        }