StylusDevice.GetStylusPoints Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Ekran kaleminden toplanan nesneleri içeren StylusPoint bir StylusPointCollection döndürür.
Aşırı Yüklemeler
| Name | Description |
|---|---|
| GetStylusPoints(IInputElement) |
Ekran kaleminden toplanan nesneleri içeren StylusPoint bir StylusPointCollection döndürür. |
| GetStylusPoints(IInputElement, StylusPointDescription) |
Ekran kaleminden toplanan nesneleri içeren StylusPoint bir StylusPointCollection döndürür. Belirtilen StylusPointDescriptionöğesini kullanır. |
GetStylusPoints(IInputElement)
Ekran kaleminden toplanan nesneleri içeren StylusPoint bir StylusPointCollection döndürür.
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
Parametreler
- relativeTo
- IInputElement
IInputElement içindeki StylusPointCollection (x,y) koordinatlarının eşlendiği yer.
Döndürülenler
StylusPointCollection Ekran kaleminin topladığı nesneleri içerenStylusPoint.
Özel durumlar
relativeToveya FrameworkContentElementdeğildirUIElement.
Örnekler
Aşağıdaki örnek, 'nin 'den StylusDevicenasıl alınduğunu StylusPointCollection gösterir.
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)
Şunlara uygulanır
GetStylusPoints(IInputElement, StylusPointDescription)
Ekran kaleminden toplanan nesneleri içeren StylusPoint bir StylusPointCollection döndürür. Belirtilen StylusPointDescriptionöğesini kullanır.
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
Parametreler
- relativeTo
- IInputElement
IInputElement içindeki StylusPointCollection (x y) koordinatlarının eşlendiği yer.
- subsetToReformatTo
- StylusPointDescription
StylusPointDescription tarafından StylusPointCollectionkullanılacak .
Döndürülenler
StylusPointCollection Ekran kaleminden toplanan nesneleri içeren StylusPoint bir.
Özel durumlar
relativeToveya FrameworkContentElementdeğildirUIElement.
Örnekler
Aşağıdaki örnekte, geçerli StylusDevice'den nesnelerin nasıl alınıyor StylusPoint olduğu gösterilmektedir.
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)
Açıklamalar
subsetToReformatToyöntemi tarafından kullanılan özelliğinin GetStylusPoints(IInputElement) özelliğiyle DescriptionStylusPointCollection uyumlu olmalıdır.
GetCommonDescription yöntemini çağırmadan GetStylusPoints(IInputElement, StylusPointDescription) önce almak StylusPointDescription için yöntemini kullanın.