在 InkCanvas 上显示笔划,但不捕获事件

发布于 2024-11-08 07:29:35 字数 155 浏览 7 评论 0原文

我正在开发一个触摸屏应用程序,并允许用户使用墨水画布将基于触摸的标记添加到覆盖内容上。我已经达到了这样的程度:覆盖层后面的视图有一个需要允许用户与之交互的元素,但事件是由 InkCanvas 捕获的,而不是由底层控件捕获的。有没有办法显示笔画,但仍然允许 InkCanvas 后面的控件捕获事件?

I am developing a touch screen application and allow users to add touch-based markup to an overlay over content using an ink canvas. I have reached a point where the view behind the overlay has an element that needs the user should be allowed to interact with, but events are captured by the InkCanvas and not by the underlying control. Is there a way to display strokes, but still allow controls behind the InkCanvas to capture events?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

话少心凉 2024-11-15 07:29:35

您可以设置 InkCanvas.IsHitTestVisible = false,它仍然会显示,但您将无法与它交互,并且所有事件都将转到 z 顺序较低的元素,这听起来正是您想要的想。

You can set InkCanvas.IsHitTestVisible = false and it will still display but you will not be able to interact with it and all events will go to elements lower in the z-order, which sounds like exactly what you want.

三月梨花 2024-11-15 07:29:35

就我而言,我正在切换 InkCanvas。为了实现此目的,我还必须设置 InkCanvas.InkPresenter.InputDeviceTypes = CoreInputDeviceTypes.None 来禁用它。

In my case I'm toggling the InkCanvas. To accomplish this, I also had to set InkCanvas.InkPresenter.InputDeviceTypes = CoreInputDeviceTypes.None to disable it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文