当前位置: 首页>>代码示例>>C#>>正文


C# Input.RightTappedRoutedEventArgs类代码示例

本文整理汇总了C#中Windows.UI.Xaml.Input.RightTappedRoutedEventArgs的典型用法代码示例。如果您正苦于以下问题:C# RightTappedRoutedEventArgs类的具体用法?C# RightTappedRoutedEventArgs怎么用?C# RightTappedRoutedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RightTappedRoutedEventArgs类属于Windows.UI.Xaml.Input命名空间,在下文中一共展示了RightTappedRoutedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PaymentViewModelList_RightTapped

        private void PaymentViewModelList_RightTapped(object sender, RightTappedRoutedEventArgs e)
        {
            var senderElement = sender as FrameworkElement;
            var flyoutBase = FlyoutBase.GetAttachedFlyout(senderElement);

            flyoutBase.ShowAt(senderElement);
        }
开发者ID:Rumpel78,项目名称:MoneyFox.Windows,代码行数:7,代码来源:PaymentListUserControl.xaml.cs

示例2: ImageToAdd_RightTapped

 private void ImageToAdd_RightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     if (sender.GetType() == typeof(Image))
         ImageToAdd_CreateDropDownMenu(sender as Image, e.GetPosition(sender as Image));
     else
         throw new Exception("Error: Expected sender to be Image but was: " + sender.GetType().ToString());
 }
开发者ID:tomazio21,项目名称:DocFingerPrinterBeta,代码行数:7,代码来源:FilesPage.xaml.cs

示例3: RightTapped

        private new async void RightTapped(object sender, RightTappedRoutedEventArgs e)
        {
            Tweet tweet = null;
            var clickBorder = e.OriginalSource as TextBlock;
            if (clickBorder != null)
            {
                tweet = (Tweet)clickBorder.DataContext;
            }
            // Create a menu and add commands specifying a callback delegate for each.
            // Since command delegates are unique, no need to specify command Ids.
            var menu = new PopupMenu();
            menu.Commands.Add(new UICommand("open tweet", (command) =>
            {
                OpenPage(tweet);
            }));
            menu.Commands.Add(new UICommand("copy to clipboard", (command) =>
            {
                CopyText();
            }));


            var chosenCommand = await menu.ShowForSelectionAsync(GetElementRect((FrameworkElement)sender));
            if (chosenCommand == null) // The command is null if no command was invoked.
            {

            }
        }
开发者ID:aursad,项目名称:FoxtrotMessageBoard,代码行数:27,代码来源:Messages.xaml.cs

示例4: StackPanel_RightTapped

 private void StackPanel_RightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     var uiSender = sender as UIElement;
     var flyout = (FlyoutBase)uiSender.GetValue(FlyoutBase.AttachedFlyoutProperty);
     flyout.Placement = FlyoutPlacementMode.Bottom;
     flyout.ShowAt(uiSender as FrameworkElement);
 }
开发者ID:MichaelAi,项目名称:Aural-Player,代码行数:7,代码来源:PlaylistControl.xaml.cs

示例5: ShowImagePopupMenu

 async  private void ShowImagePopupMenu(object sender, RightTappedRoutedEventArgs e)
  {
      PopupMenu menu = new PopupMenu();
      menu.Commands.Add(new UICommand("分享到", async (command) =>
      {
          MessageDialog md = new MessageDialog(command.Label);
          await md.ShowAsync();
      }));
      menu.Commands.Add(new UICommand("另存为", async (command) =>
      {
          MessageDialog md = new MessageDialog(command.Label);
          await md.ShowAsync();
      }));
      menu.Commands.Add(new UICommand("编辑", async (command) =>
      {
          MessageDialog md = new MessageDialog(command.Label);
          await md.ShowAsync();
      }));
      menu.Commands.Add(new UICommandSeparator());
      menu.Commands.Add(new UICommand("打印", async (command) =>
      {
          MessageDialog md = new MessageDialog(command.Label);
          await md.ShowAsync();
      }));
      menu.Commands.Add(new UICommand("全屏", async (command) =>
      {
          MessageDialog md = new MessageDialog(command.Label);
          await md.ShowAsync();
      }));
      var chosenCommand = await menu.ShowForSelectionAsync(GetElementRect((FrameworkElement)sender));
  }
开发者ID:BeyondVincent,项目名称:WindowsStoreAppCode,代码行数:31,代码来源:MainPage.xaml.cs

示例6: OnRightTapped

 protected override void OnRightTapped(RightTappedRoutedEventArgs e) {
     if (_IsPointerPressed) {
         ShowContextMenu(null, e.GetPosition(null));
         e.Handled = true;
     }
     base.OnRightTapped(e);
 }
开发者ID:ronlemire2,项目名称:UWP-Testers,代码行数:7,代码来源:rjlSimpleMenuFlyoutPage.xaml.cs

示例7: AccountList_RightTapped

        private void AccountList_RightTapped(object sender, RightTappedRoutedEventArgs e)
        {
            var senderElement = sender as FrameworkElement;
            var flyoutBase = FlyoutBase.GetAttachedFlyout(senderElement) as MenuFlyout;

            flyoutBase?.ShowAt(senderElement, e.GetPosition(senderElement));
        }
开发者ID:NPadrutt,项目名称:MoneyFox.Windows,代码行数:7,代码来源:AccountListView.xaml.cs

示例8: WallpaperOnRightTapped

 private void WallpaperOnRightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     if(ViewModelLocator.Mobile)
         return;
     var grid = sender as FrameworkElement;
     FlyoutBase.GetAttachedFlyout(grid).ShowAt(grid);
 }
开发者ID:Mordonus,项目名称:MALClient,代码行数:7,代码来源:WallpaperItem.xaml.cs

示例9: SavedFile_RightTapped

 private void SavedFile_RightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     var item = sender as FrameworkElement;
     if(item != null)
     {
         FlyoutBase.ShowAttachedFlyout(item);
     }
 }
开发者ID:pingzing,项目名称:Codeco,代码行数:8,代码来源:MainPage.xaml.cs

示例10: LayoutRoot_RightTapped

 private void LayoutRoot_RightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     if (IsHolding)
         return;
     var targetElement = sender as FrameworkElement;
     MenuFlyout flyout = (MenuFlyout)FlyoutBase.GetAttachedFlyout(targetElement);
     flyout.ShowAt(targetElement, e.GetPosition(targetElement));
 }
开发者ID:akshay2000,项目名称:MonocleGiraffe,代码行数:8,代码来源:ImageUserControl.xaml.cs

示例11: UiElementOnRightTapped

 private void UiElementOnRightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     if (isPointerPressed)
     {
         ShowMenu(e.GetPosition(uiElement));
         e.Handled = true;
     }
 }
开发者ID:Opiumtm,项目名称:DvachBrowser3,代码行数:8,代码来源:PopupLogicHelper.cs

示例12: TopicOnRightClick

        private void TopicOnRightClick(object sender, RightTappedRoutedEventArgs e)
        {
            if (ViewModel.PrevArgs.WorkMode == ForumBoardPageWorkModes.WatchedTopics || ViewModel.PrevArgs.WorkMode == ForumBoardPageWorkModes.UserSearch)
                return;

            if ((e.OriginalSource as FrameworkElement).DataContext is ForumTopicEntryViewModel)
                ItemFlyoutService.ShowForumTopicFlyout(e.OriginalSource as FrameworkElement);
            e.Handled = true;
        }
开发者ID:Mordonus,项目名称:MALClient,代码行数:9,代码来源:ForumBoardPage.xaml.cs

示例13: OcrListItem_RightTapped

 private void OcrListItem_RightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     FrameworkElement element = sender as FrameworkElement;
     if (element == null)
     {
         return;
     }
     var flyout = FlyoutBase.GetAttachedFlyout(element) as MenuFlyout;
     flyout?.ShowAt(this, e.GetPosition(null));
 }
开发者ID:pingzing,项目名称:SimpleOcr10,代码行数:10,代码来源:MainPage.xaml.cs

示例14: TrackStackPanel_RightTapped

 private void TrackStackPanel_RightTapped(object sender, RightTappedRoutedEventArgs e)
 {
     FrameworkElement senderElement = sender as FrameworkElement;
     FlyoutBase flyoutBase = FlyoutBase.GetAttachedFlyout(senderElement);
     flyoutBase.ShowAt(senderElement);
     //var flyout = this.Resources["TrackContextMenu"] as MenuFlyout;
     //flyout.ShowAt((UIElement)AlbumPage, new Windows.Foundation.Point(0, 0));
     //flyout.ShowAt((UIElement)sender, new Windows.Foundation.Point(0, 0));
     //flyout.ShowAt((FrameworkElement)sender);
 }
开发者ID:jaydcarlson,项目名称:belial,代码行数:10,代码来源:TrackList.xaml.cs

示例15: Grid_RightTapped

        private void Grid_RightTapped( object sender, RightTappedRoutedEventArgs e )
        {
            Grid ItemGrid = ( Grid ) sender;
            FlyoutTargetItem = ItemGrid.DataContext as BookmarkListItem;

            if ( FlyoutTargetItem.AnchorIndex != -1 )
            {
                FlyoutBase.ShowAttachedFlyout( ItemGrid );
            }
        }
开发者ID:tgckpg,项目名称:wenku10,代码行数:10,代码来源:BookmarkList.xaml.cs


注:本文中的Windows.UI.Xaml.Input.RightTappedRoutedEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。