private void CardListRightTappedHandler(object sender, RightTappedRoutedEventArgs e) { if (isPointerPressed) { CardShowMenuFlyout = (e.OriginalSource as FrameworkElement).DataContext as CardInformation; CardListViewMenuFlyout.ShowAt(null, e.GetPosition(null)); e.Handled = true; var pointerPosition = e.GetPosition(mainGrid); pointToShowFlyout.Margin = new Thickness(pointerPosition.X, pointerPosition.Y, 0, 0); } }
private void CardListHoldingHandler(object sender, HoldingRoutedEventArgs e) { if (e.HoldingState == Windows.UI.Input.HoldingState.Started) { CardListViewMenuFlyout.ShowAt(null, e.GetPosition(null)); CardShowMenuFlyout = (e.OriginalSource as FrameworkElement).DataContext as CardInformation; e.Handled = true; isPointerPressed = false; var pointerPosition = e.GetPosition(mainGrid); pointToShowFlyout.Margin = new Thickness(pointerPosition.X, pointerPosition.Y, 0, 0); } }