在WPF中直接操作? [英] Direct manipulation in WPF?

查看:101
本文介绍了在WPF中直接操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用  直接操作在WPF中?我想从ui线程处理触摸事件,以便能够将转换应用于元素。



Alvaro Rivoir

解决方案

您好Alvaro R ivoir,


>>是否可以使用  直接操作?我想从ui线程处理触摸事件,以便能够将转换应用于元素。


WPF使应用程序能够响应触摸。例如,您可以使用触摸敏感设备上的一个或多个手指与应用程序进行交互,例如触摸屏本演练创建一个应用程序,使用户可以移动,调整大小,
或旋转单个对象使用触摸。欲了解更多信息,请参阅:


https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/walkthrough-creating-your-first-touch-application


以下是WPF中支持多点触控的完整示例供您参考。


https://code.msdn.microsoft.com/windowsdesktop/CSWPF3DMultiTouch-17e457ba#content



如果你想使用
。直接操作
在WPF中,请参考以下主题,该主题通过生成互操作程序集提供解决方案


https://stackoverflow.com/questions/16 572006 / how-to-access-direct-manipulation-interfaces


祝你好运,


张龙


Is it possible to use Direct Manipulation in WPF? I want to process touch events off the ui-thread to be able to apply transformations to an element.


Alvaro Rivoir

解决方案

Hi Alvaro Rivoir,

>>Is it possible to use Direct Manipulation in WPF? I want to process touch events off the ui-thread to be able to apply transformations to an element.

WPF enables applications to respond to touch. For example, you can interact with an application by using one or more fingers on a touch-sensitive device, such as a touchscreen This walkthrough creates an application that enables the user to move, resize, or rotate a single object by using touch. for more information, please refer to:

https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/walkthrough-creating-your-first-touch-application

Here is complete sample about Support multi-touch in WPF for your reference.

https://code.msdn.microsoft.com/windowsdesktop/CSWPF3DMultiTouch-17e457ba#content

If you want to use Direct Manipulation in WPF, please refer to the following thread, which provide a solution via generating an interop assembly

https://stackoverflow.com/questions/16572006/how-to-access-direct-manipulation-interfaces

Best regards,

Zhanglong


这篇关于在WPF中直接操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆