StylusDevice.GetStylusPoints Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee wordt een StylusPointCollection object geretourneerd dat objecten bevat StylusPoint die zijn verzameld van de stylus.
Overloads
| Name | Description |
|---|---|
| GetStylusPoints(IInputElement) |
Hiermee wordt een StylusPointCollection object geretourneerd dat objecten bevat StylusPoint die zijn verzameld van de stylus. |
| GetStylusPoints(IInputElement, StylusPointDescription) |
Hiermee wordt een StylusPointCollection object geretourneerd dat objecten bevat StylusPoint die zijn verzameld van de stylus. Maakt gebruik van de opgegeven StylusPointDescription. |
GetStylusPoints(IInputElement)
Hiermee wordt een StylusPointCollection object geretourneerd dat objecten bevat StylusPoint die zijn verzameld van de stylus.
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
Parameters
- relativeTo
- IInputElement
De IInputElement coördinaten waaraan de (x,y) coördinaten in de StylusPointCollection kaart zijn toegewezen.
Retouren
Een StylusPointCollection met StylusPoint objecten die door de stylus zijn verzameld.
Uitzonderingen
relativeTo is geen van beide UIElement of FrameworkContentElement.
Voorbeelden
In het volgende voorbeeld ziet u hoe u het StylusPointCollection kunt ophalen uit de StylusDevice.
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)
Van toepassing op
GetStylusPoints(IInputElement, StylusPointDescription)
Hiermee wordt een StylusPointCollection object geretourneerd dat objecten bevat StylusPoint die zijn verzameld van de stylus. Maakt gebruik van de opgegeven 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
Parameters
- relativeTo
- IInputElement
De IInputElement coördinaten waaraan de (x y) coördinaten in de StylusPointCollection kaart zijn toegewezen.
- subsetToReformatTo
- StylusPointDescription
De StylusPointDescription te gebruiken door de StylusPointCollection.
Retouren
Een StylusPointCollection met StylusPoint objecten die zijn verzameld van de stylus.
Uitzonderingen
relativeTo is geen van beide UIElement of FrameworkContentElement.
Voorbeelden
In het volgende voorbeeld ziet u hoe u objecten ophaalt StylusPoint uit de huidige StylusDevice.
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)
Opmerkingen
subsetToReformatTo moet compatibel zijn met de Description eigenschap van de StylusPointCollection methode die wordt GetStylusPoints(IInputElement) gebruikt. Gebruik de GetCommonDescription methode om een op StylusPointDescription te halen voordat u de GetStylusPoints(IInputElement, StylusPointDescription) methode aanroept.