StylusDevice 类

定义

表示与 Tablet PC 一起使用的触笔。Represents a tablet pen used with a Tablet PC.

public ref class StylusDevice sealed : System::Windows::Input::InputDevice
public sealed class StylusDevice : System.Windows.Input.InputDevice
type StylusDevice = class
    inherit InputDevice
Public NotInheritable Class StylusDevice
Inherits InputDevice
继承

示例

下面的示例演示如何检索对默认触笔设备的引用。The following example demonstrates how to retrieve a reference to the default stylus device.

// Get the current stylus device
StylusDevice myStylusDevice = Stylus.CurrentStylusDevice;
' Get the current stylus device
Dim myStylusDevice As StylusDevice = Stylus.CurrentStylusDevice

属性

ActiveSource

获取报告触笔当前输入的 PresentationSourceGets the PresentationSource that reports current input for the stylus.

Captured

获取捕获触笔的元素。Gets the element that captured the stylus.

DirectlyOver

获取指针置于其上的 IInputElementGets the IInputElement that the pointer is positioned over.

Dispatcher

获取与此 Dispatcher 关联的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(继承自 DispatcherObject)
Id

获取触笔设备的标识符。Gets the identifier for the stylus device.

InAir

获取触笔是否位于数字化仪上但尚未连接数字化仪。Gets whether the tablet pen is positioned above, yet not in contact with, the digitizer.

InRange

获取一个指示触笔是否在数字化仪范围内的值。Gets a value that indicates whether the tablet pen is in range of the digitizer.

Inverted

获取一个值,该值指示是否正在使用触笔的辅助笔尖。Gets a value that indicates whether the secondary tip of the stylus is in use.

IsValid

获取一个值,该值指示触笔设备是否有效。Gets a value that indicates whether a stylus device is valid.

Name

获取触笔的名称。Gets the name of the stylus.

StylusButtons

获取触笔上的触笔按钮。Gets the stylus buttons on the stylus.

TabletDevice

获取表示与当前 TabletDevice 关联的数字化仪的 StylusDeviceGets the TabletDevice representing the digitizer associated with the current StylusDevice.

Target

获取接收输入的元素。Gets the element that receives input.

方法

Capture(IInputElement)

将触笔输入绑定到指定元素。Binds input from the stylus to the specified element.

Capture(IInputElement, CaptureMode)

将触笔绑定到指定元素。Binds the stylus to the specified element.

CheckAccess()

确定调用线程是否可以访问此 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)
Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetPosition(IInputElement)

获取触笔的位置。Gets the position of the stylus.

GetStylusPoints(IInputElement)

返回一个 StylusPointCollection,其中包含从触笔收集的 StylusPoint 对象。Returns a StylusPointCollection that contains StylusPoint objects collected from the stylus.

GetStylusPoints(IInputElement, StylusPointDescription)

返回一个 StylusPointCollection,其中包含从触笔收集的 StylusPoint 对象。Returns a StylusPointCollection that contains StylusPoint objects collected from the stylus. 使用指定的 StylusPointDescriptionUses the specified StylusPointDescription.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Synchronize()

同步光标和用户界面。Synchronizes the cursor and the user interface.

ToString()

返回触笔设备的名称。Returns the name of the stylus device.

VerifyAccess()

强制调用线程具有此 DispatcherObject 的访问权限。Enforces that the calling thread has access to this DispatcherObject.

(继承自 DispatcherObject)

适用于