次の方法で共有


StylusDevice.GetStylusPoints メソッド

定義

スタイラスから収集されたStylusPointオブジェクトを含むStylusPointCollectionを返します。

オーバーロード

名前 説明
GetStylusPoints(IInputElement)

スタイラスから収集されたStylusPointオブジェクトを含むStylusPointCollectionを返します。

GetStylusPoints(IInputElement, StylusPointDescription)

スタイラスから収集されたStylusPointオブジェクトを含むStylusPointCollectionを返します。 指定した StylusPointDescriptionを使用します。

GetStylusPoints(IInputElement)

スタイラスから収集されたStylusPointオブジェクトを含むStylusPointCollectionを返します。

public:
 System::Windows::Input::StylusPointCollection ^ GetStylusPoints(System::Windows::IInputElement ^ relativeTo);
public System.Windows.Input.StylusPointCollection GetStylusPoints(System.Windows.IInputElement relativeTo);
member this.GetStylusPoints : System.Windows.IInputElement -> System.Windows.Input.StylusPointCollection
Public Function GetStylusPoints (relativeTo As IInputElement) As StylusPointCollection

パラメーター

relativeTo
IInputElement

StylusPointCollection内の (x,y) 座標がマップされるIInputElement

戻り値

スタイラスが収集したStylusPointオブジェクトを含むStylusPointCollection

例外

relativeToUIElement でも FrameworkContentElementでもありません。

次の例では、StylusDeviceからStylusPointCollectionを取得する方法を示します。

StylusPointCollection myStylusPoints =
            myStylusDevice.GetStylusPoints(myStylusDevice.Target);
textbox1.AppendText("Got " + myStylusPoints.Count.ToString() + " packets\n");
Dim myStylusPoints As StylusPointCollection = _
    myStylusDevice.GetStylusPoints(myStylusDevice.Target)
textbox1.AppendText("Got " + myStylusPoints.Count.ToString() + " packets" + vbCrLf)

適用対象

GetStylusPoints(IInputElement, StylusPointDescription)

スタイラスから収集されたStylusPointオブジェクトを含むStylusPointCollectionを返します。 指定した StylusPointDescriptionを使用します。

public:
 System::Windows::Input::StylusPointCollection ^ GetStylusPoints(System::Windows::IInputElement ^ relativeTo, System::Windows::Input::StylusPointDescription ^ subsetToReformatTo);
public System.Windows.Input.StylusPointCollection GetStylusPoints(System.Windows.IInputElement relativeTo, System.Windows.Input.StylusPointDescription subsetToReformatTo);
member this.GetStylusPoints : System.Windows.IInputElement * System.Windows.Input.StylusPointDescription -> System.Windows.Input.StylusPointCollection
Public Function GetStylusPoints (relativeTo As IInputElement, subsetToReformatTo As StylusPointDescription) As StylusPointCollection

パラメーター

relativeTo
IInputElement

StylusPointCollection内の (x y) 座標がマップされるIInputElement

subsetToReformatTo
StylusPointDescription

StylusPointCollectionによって使用されるStylusPointDescription

戻り値

スタイラスから収集StylusPointオブジェクトを含むStylusPointCollection

例外

relativeToUIElement でも FrameworkContentElementでもありません。

次の例では、現在のStylusDeviceからStylusPointオブジェクトを取得する方法を示します。

StylusDevice currentStylus = Stylus.CurrentStylusDevice;
StylusPointDescription description1 =
      new StylusPointDescription(new StylusPointPropertyInfo[]
                    {
                        new StylusPointPropertyInfo(StylusPointProperties.X),
                        new StylusPointPropertyInfo(StylusPointProperties.Y),
                        new StylusPointPropertyInfo(StylusPointProperties.NormalPressure),
                        new StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation),
                        new StylusPointPropertyInfo(StylusPointProperties.BarrelButton)
                    });

StylusPointDescription description2 = currentStylus.GetStylusPoints(inkCanvas1).Description;

StylusPointDescription description3 = 
    StylusPointDescription.GetCommonDescription(description1, description2);

StylusPointCollection points = currentStylus.GetStylusPoints(inkCanvas1, description3);
Dim currentStylus As StylusDevice = Stylus.CurrentStylusDevice

Dim description1 As New StylusPointDescription(New StylusPointPropertyInfo() _
    {New StylusPointPropertyInfo(StylusPointProperties.X), _
     New StylusPointPropertyInfo(StylusPointProperties.Y), _
     New StylusPointPropertyInfo(StylusPointProperties.NormalPressure), _
     New StylusPointPropertyInfo(StylusPointProperties.XTiltOrientation), _
     New StylusPointPropertyInfo(StylusPointProperties.YTiltOrientation), _
     New StylusPointPropertyInfo(StylusPointProperties.BarrelButton)})

Dim description2 As StylusPointDescription = currentStylus.GetStylusPoints(inkCanvas1).Description

Dim description3 As StylusPointDescription = _
                        StylusPointDescription.GetCommonDescription(description1, description2)

Dim points As StylusPointCollection = currentStylus.GetStylusPoints(inkCanvas1, description3)

注釈

subsetToReformatToは、GetStylusPoints(IInputElement) メソッドで使用されるStylusPointCollectionDescription プロパティと互換性がある必要があります。 GetCommonDescription メソッドを使用して、GetStylusPoints(IInputElement, StylusPointDescription) メソッドを呼び出す前にStylusPointDescriptionを取得します。

適用対象