StylusPointDescription Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the StylusPointDescription class.
Overloads
StylusPointDescription() |
Initializes a new instance of the StylusPointDescription class. |
StylusPointDescription(IEnumerable<StylusPointPropertyInfo>) |
Initializes a new instance of the StylusPointDescription class with the specified StylusPointPropertyInfo objects. |
StylusPointDescription()
Initializes a new instance of the StylusPointDescription class.
public:
StylusPointDescription();
public StylusPointDescription ();
Public Sub New ()
Examples
The following example creates a StylusPointDescription object and uses it to create a StylusPoint.
StylusPointDescription newDescription =
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)
});
int[] propertyValues = { 1800, 1000, 1 };
StylusPoint newStylusPoint = new StylusPoint(100, 100, .5f, newDescription, propertyValues);
Dim newDescription 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 propertyValues As Integer() = {1800, 1000, 1}
Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues)
Remarks
The parameterless constructor creates a StylusPointDescription that contains information for the properties X, Y, and NormalPressure.
Applies to
StylusPointDescription(IEnumerable<StylusPointPropertyInfo>)
Initializes a new instance of the StylusPointDescription class with the specified StylusPointPropertyInfo objects.
public:
StylusPointDescription(System::Collections::Generic::IEnumerable<System::Windows::Input::StylusPointPropertyInfo ^> ^ stylusPointPropertyInfos);
public StylusPointDescription (System.Collections.Generic.IEnumerable<System.Windows.Input.StylusPointPropertyInfo> stylusPointPropertyInfos);
new System.Windows.Input.StylusPointDescription : seq<System.Windows.Input.StylusPointPropertyInfo> -> System.Windows.Input.StylusPointDescription
Public Sub New (stylusPointPropertyInfos As IEnumerable(Of StylusPointPropertyInfo))
Parameters
- stylusPointPropertyInfos
- IEnumerable<StylusPointPropertyInfo>
A generic IEnumerable of type StylusPointPropertyInfo that specifies the properties in the StylusPointDescription.
Examples
The following example creates an StylusPointDescription object and uses it to create a StylusPoint.
StylusPointDescription newDescription =
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)
});
int[] propertyValues = { 1800, 1000, 1 };
StylusPoint newStylusPoint = new StylusPoint(100, 100, .5f, newDescription, propertyValues);
Dim newDescription 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 propertyValues As Integer() = {1800, 1000, 1}
Dim newStylusPoint As New StylusPoint(100, 100, 0.5F, newDescription, propertyValues)
Remarks
You must pass in StylusPointPropertyInfo objects for the properties, X, Y, and NormalPressure.