本文整理汇总了C#中Windows.UI.Xaml.Input.RightTappedRoutedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# RightTappedRoutedEventArgs类的具体用法?C# RightTappedRoutedEventArgs怎么用?C# RightTappedRoutedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RightTappedRoutedEventArgs类属于Windows.UI.Xaml.Input命名空间,在下文中一共展示了RightTappedRoutedEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: OnTextBlockRightTapped
async void OnTextBlockRightTapped(object sender, RightTappedRoutedEventArgs e) {
PopupMenu popupMenu = new PopupMenu();
popupMenu.Commands.Add(new UICommand("Larger Font", OnFontSizeChanged, 1.2));
popupMenu.Commands.Add(new UICommand("Smaller Font", OnFontSizeChanged, 1 / 1.2));
popupMenu.Commands.Add(new UICommandSeparator());
popupMenu.Commands.Add(new UICommand("Red", OnColorChanged, Colors.Red));
popupMenu.Commands.Add(new UICommand("Green", OnColorChanged, Colors.Green));
popupMenu.Commands.Add(new UICommand("Blue", OnColorChanged, Colors.Blue));
await popupMenu.ShowAsync(e.GetPosition(this));
}
开发者ID:ronlemire2,项目名称:UWP-Testers,代码行数:11,代码来源:SimpleContextMenuPage.xaml.cs
示例17: ListViewNotes_RightTapped
private async void ListViewNotes_RightTapped(object sender, RightTappedRoutedEventArgs e)
{
var menu = new PopupMenu();
menu.Commands.Add(new UICommand("Edit"));
var chosenCommand = await menu.ShowForSelectionAsync(GetElementRect((FrameworkElement)sender));
if (chosenCommand.Label == "Edit")
{
this.Frame.Navigate(
typeof(NoteDetailPage),
sender,
new Windows.UI.Xaml.Media.Animation.DrillInNavigationTransitionInfo());
}
}
开发者ID:BrianLima,项目名称:QuickForCortana,代码行数:14,代码来源:NotesList.xaml.cs
示例18: ePubItemRightTapped
private void ePubItemRightTapped(object sender, RightTappedRoutedEventArgs e)
{
FrameworkElement ancestor = sender as FrameworkElement;
while (ancestor != null)
{
if (ancestor is MainPage)
{
(ancestor as MainPage).ePubItemRightTapped(sender, e);
break;
}
ancestor = VisualTreeHelper.GetParent(ancestor) as FrameworkElement;
}
}
开发者ID:RareNCool,项目名称:EPubReader,代码行数:15,代码来源:EPubItemContainer.xaml.cs
示例19: listView_RightTapped
private void listView_RightTapped(object sender, RightTappedRoutedEventArgs e)
{
FrameworkElement element = (FrameworkElement)sender;
if (e.OriginalSource.GetType() == typeof(ListViewItemPresenter))
device = (Device)((ContentPresenter)e.OriginalSource).Content;
else if (e.OriginalSource.GetType() == typeof(StackPanel))
device = (Device)((FrameworkElement)e.OriginalSource).DataContext;
else
device = (Device)((FrameworkElement)((FrameworkElement)e.OriginalSource).Parent).DataContext;
if (device.MacAddress.StartsWith("b8:27:eb"))
mf_pi.ShowAt(element, point);
else
mf_netmf.ShowAt(element, point);
}
开发者ID:cyberh0me,项目名称:IoT,代码行数:16,代码来源:DiscoveryPage.xaml.cs
示例20: Grid_RightTapped
private void Grid_RightTapped(object sender, RightTappedRoutedEventArgs e)
{
var grid = sender as Grid;
var childCount = VisualTreeHelper.GetChildrenCount(grid);
for (int i = 0; i < childCount; i++)
{
var child = VisualTreeHelper.GetChild(grid, i);
if (child is TextBlock)
{
if (child.GetValue(TextBlock.NameProperty).ToString() == "text_uniqueId")
{
_rightTappedGuid = child.GetValue(TextBlock.TextProperty).ToString();
}
}
}
FlyoutBase.ShowAttachedFlyout(sender as Grid);
}
开发者ID:garicchi,项目名称:CortanaCommand,代码行数:17,代码来源:CommandPage.xaml.cs
注:本文中的Windows.UI.Xaml.Input.RightTappedRoutedEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论