本文整理汇总了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);
}
示例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());
}
示例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.
{
}
}
示例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);
}
示例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));
}
示例6: OnRightTapped
protected override void OnRightTapped(RightTappedRoutedEventArgs e) {
if (_IsPointerPressed) {
ShowContextMenu(null, e.GetPosition(null));
e.Handled = true;
}
base.OnRightTapped(e);
}
示例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));
}
示例8: WallpaperOnRightTapped
private void WallpaperOnRightTapped(object sender, RightTappedRoutedEventArgs e)
{
if(ViewModelLocator.Mobile)
return;
var grid = sender as FrameworkElement;
FlyoutBase.GetAttachedFlyout(grid).ShowAt(grid);
}
示例9: SavedFile_RightTapped
private void SavedFile_RightTapped(object sender, RightTappedRoutedEventArgs e)
{
var item = sender as FrameworkElement;
if(item != null)
{
FlyoutBase.ShowAttachedFlyout(item);
}
}
示例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));
}
示例11: UiElementOnRightTapped
private void UiElementOnRightTapped(object sender, RightTappedRoutedEventArgs e)
{
if (isPointerPressed)
{
ShowMenu(e.GetPosition(uiElement));
e.Handled = true;
}
}
示例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;
}
示例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));
}
示例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);
}
示例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 );
}
}