本文整理汇总了C#中Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs.GetPosition方法的典型用法代码示例。如果您正苦于以下问题:C# DoubleTappedRoutedEventArgs.GetPosition方法的具体用法?C# DoubleTappedRoutedEventArgs.GetPosition怎么用?C# DoubleTappedRoutedEventArgs.GetPosition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Windows.UI.Xaml.Input.DoubleTappedRoutedEventArgs
的用法示例。
在下文中一共展示了DoubleTappedRoutedEventArgs.GetPosition方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDoubleTapped
private async void OnDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
{
if (GameClient == null)
return;
var position = e.GetPosition(canvas);
await PerformBasicTouchNavigation(canvas, position.ToVector2());
}
示例2: image_DoubleTapped
private void image_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
{
//Get the precise pointer position at the time of doubletap in order to center the view at that location
p = e.GetPosition(sender as Image);
//set the internal flag to track the doubletapped gesture
isDoubleTapped = true;
}
示例3: Image_DoubleTapped
public void Image_DoubleTapped(object sender, DoubleTappedRoutedEventArgs args)
{
var point = args.GetPosition((UIElement)sender);
this.Model.ZoomIn(point.X, point.Y);
this.DrawMandelbrot();
}
示例4: Img_DoubleTapped
private void Img_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
{
tapped_times = 2;
if (this.sv.ZoomFactor == this.sv.MinZoomFactor)
{
var appView = ApplicationView.GetForCurrentView();
var point = e.GetPosition(Window.Current.Content);
var point1 = e.GetPosition(Img);
var point2 = e.GetPosition(sv);
double X, Y, deltaX, deltaY;
deltaX = (appView.VisibleBounds.Width - Img.ActualWidth) / 2;
deltaY = (appView.VisibleBounds.Height - Img.ActualHeight) / 2;
X = point.X - deltaX;
Y = point.Y - deltaY;
this.sv.ZoomToFactor(this.sv.MaxZoomFactor);
sv.ScrollToHorizontalOffset(X * (this.sv.MaxZoomFactor - 1) - deltaX);
sv.ScrollToVerticalOffset(Y * (this.sv.MaxZoomFactor - 1) - deltaY);
}
else
{
this.sv.ZoomToFactor(this.sv.MinZoomFactor);
}
e.Handled = true;
tapped_times = 0;
}
示例5: GameBoardScrollViewer_OnDoubleTapped
private void GameBoardScrollViewer_OnDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
{
var zoomPoint = e.GetPosition(GameBoardScrollViewer);
GameBoardScrollViewer.ScrollToHorizontalOffset(zoomPoint.X);
GameBoardScrollViewer.ScrollToVerticalOffset(zoomPoint.Y);
GameBoardScrollViewer.ZoomToFactor(GameBoardScrollViewer.ZoomFactor > 1.5f ? .5f : 2.0f);
}
示例6: ImageDoubleTapped
private async void ImageDoubleTapped(object sender, DoubleTappedRoutedEventArgs e)
{
if (sender != null && !string.IsNullOrEmpty(ViewModel.TranslationFile))
{
if (!await FileUtils.HaveAyaPositionFile())
{
await ViewModel.DownloadAyahPositionFile();
}
var cachedImage = sender as CachedImage;
if (cachedImage == null)
return;
var ayah = await CachedImage.GetAyahFromGesture(e.GetPosition(cachedImage.Image),
ViewModel.CurrentPageNumber,
radSlideView.ActualWidth);
var currentPage = ViewModel.CurrentPage;
if (currentPage != null)
{
ViewModel.SelectedAyah = ayah;
if (await ViewModel.HasTranslationFile())
{
ViewModel.ShowTranslation = !ViewModel.ShowTranslation;
SettingsUtils.Set(Constants.PREF_SHOW_TRANSLATION, ViewModel.ShowTranslation);
}
}
}
}