【问题标题】:How to get the fingers count in the InkCanvas?如何在 InkCanvas 中计算手指数?
【发布时间】:2017-10-20 04:10:54
【问题描述】:

当手指计数大于 1 时,我尝试缩放 InkCanvas,但无法在 InkCanvas 中获取手指计数。请帮助我如何在 InkCanvas 中获取手指计数。

【问题讨论】:

  • 我已经向 Microsoft Ink 团队询问了这个确切的功能。仍然不可用。

标签: uwp inkcanvas


【解决方案1】:

我没有要测试的触摸屏,但也许这会起作用:

    int count;

    private void InkCanvas_PointerEntered(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
    {
        count++;
    }

    private void InkCanvas_PointerExited(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)
    {
        count--;
    }

如果没有帮助。尝试使用PinterPressedPointerReleased。您可以从事件 args 中获取点 Id 并处理它们。

【讨论】:

  • 这不适用于缩放。 DirectManipulation 启动并吸收指针事件。
  • 是的..它不起作用。我试过这个 InkPath.InkPresenter.ActivateCustomDrying(); InkPath.InkPresenter.SetPredefinedConfiguration(InkPresenterPredefinedConfiguration.SimpleMultiplePointer);现在我可以在 StrokeStarted 事件中获取手指计数,但由于使用了自定义干燥,我得到的 StrokeContainer 值为 null。
  • @Santhiya 文档说:如果启用了自定义干燥模式(ActivateCustomDrying),则 StrokeContainer 为空。你解决了在InkCanvas 中获取手指数的问题吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-10-19
  • 2021-08-17
  • 2010-09-14
  • 2015-09-15
  • 1970-01-01
相关资源
最近更新 更多