StylusPointCollection Constructors
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.
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse.
Overloads
| Name | Description |
|---|---|
| StylusPointCollection() |
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse. |
| StylusPointCollection(IEnumerable<StylusPoint>) |
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse met de opgegeven StylusPoint objecten. |
| StylusPointCollection(IEnumerable<Point>) |
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse met opgegeven punten. |
| StylusPointCollection(Int32) |
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse die in eerste instantie het opgegeven aantal StylusPoint objecten kan bevatten. |
| StylusPointCollection(StylusPointDescription) |
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse die de eigenschappen bevat die zijn opgegeven in de StylusPointDescription. |
| StylusPointCollection(StylusPointDescription, Int32) |
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse die de opgegeven grootte is en bevat de eigenschappen die zijn opgegeven in de StylusPointDescription. |
StylusPointCollection()
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse.
public:
StylusPointCollection();
public StylusPointCollection();
Public Sub New ()
Voorbeelden
In het volgende voorbeeld worden objecten verzameld StylusPoint in de OnStylusDown methode van een aangepast besturingselement. In het voorbeeld wordt een StylusPointCollection gemaakt door de StylusPointDescription en de oorspronkelijke grootte van de StylusPointCollection.
StylusPointCollection stylusPoints;
protected override void OnStylusDown(StylusDownEventArgs e)
{
base.OnStylusDown(e);
StylusPointCollection eventPoints = e.GetStylusPoints(this);
// Create a new StylusPointCollection using the StylusPointDescription
// from the stylus points in the StylusDownEventArgs.
stylusPoints = new StylusPointCollection(eventPoints.Description, eventPoints.Count);
stylusPoints.Add(eventPoints);
}
Private stylusPoints As StylusPointCollection
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)
MyBase.OnStylusDown(e)
Dim eventPoints As StylusPointCollection = e.GetStylusPoints(Me)
' Create a new StylusPointCollection using the StylusPointDescription
' from the stylus points in the StylusDownEventArgs.
stylusPoints = New StylusPointCollection(eventPoints.Description, eventPoints.Count)
stylusPoints.Add(eventPoints)
End Sub
Van toepassing op
StylusPointCollection(IEnumerable<StylusPoint>)
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse met de opgegeven StylusPoint objecten.
public:
StylusPointCollection(System::Collections::Generic::IEnumerable<System::Windows::Input::StylusPoint> ^ stylusPoints);
public StylusPointCollection(System.Collections.Generic.IEnumerable<System.Windows.Input.StylusPoint> stylusPoints);
new System.Windows.Input.StylusPointCollection : seq<System.Windows.Input.StylusPoint> -> System.Windows.Input.StylusPointCollection
Public Sub New (stylusPoints As IEnumerable(Of StylusPoint))
Parameters
- stylusPoints
- IEnumerable<StylusPoint>
Een algemene IEnumerable van het type StylusPoint dat moet worden toegevoegd aan de StylusPointCollection.
Uitzonderingen
stylusPoints is null.
De lengte is points 0.
– of –
De StylusPoint objecten in zijn stylusPoints niet-compatibele StylusPointDescription objecten.
Voorbeelden
In het volgende voorbeeld wordt een StylusPointCollection gemaakt.
StylusPoint stylusPoint1 = new StylusPoint(100, 100, .5f);
StylusPoint stylusPoint2 = new StylusPoint(200, 200, .35f);
StylusPointCollection points = new StylusPointCollection(
new StylusPoint[] { stylusPoint1, stylusPoint2 });
Dim stylusPoint1 As New StylusPoint(100, 100, 0.5F)
Dim stylusPoint2 As New StylusPoint(200, 200, 0.35F)
Dim points As New StylusPointCollection(New StylusPoint() {stylusPoint1, stylusPoint2})
Van toepassing op
StylusPointCollection(IEnumerable<Point>)
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse met opgegeven punten.
public:
StylusPointCollection(System::Collections::Generic::IEnumerable<System::Windows::Point> ^ points);
public StylusPointCollection(System.Collections.Generic.IEnumerable<System.Windows.Point> points);
new System.Windows.Input.StylusPointCollection : seq<System.Windows.Point> -> System.Windows.Input.StylusPointCollection
Public Sub New (points As IEnumerable(Of Point))
Parameters
- points
- IEnumerable<Point>
Een algemene IEnumerable van het type Point dat de StylusPoint objecten aangeeft die moeten worden toegevoegd aan de StylusPointCollection.
Uitzonderingen
points is null.
De lengte is points 0.
Voorbeelden
In het volgende voorbeeld wordt een StylusPointCollection gemaakt.
StylusPointCollection points = new StylusPointCollection(new Point[]
{
new Point(100, 100),
new Point(100, 200),
new Point(200, 250),
new Point(300, 300)
});
Dim points As New StylusPointCollection(New Point() _
{New Point(100, 100), _
New Point(100, 200), _
New Point(200, 250), _
New Point(300, 300)})
Van toepassing op
StylusPointCollection(Int32)
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse die in eerste instantie het opgegeven aantal StylusPoint objecten kan bevatten.
public:
StylusPointCollection(int initialCapacity);
public StylusPointCollection(int initialCapacity);
new System.Windows.Input.StylusPointCollection : int -> System.Windows.Input.StylusPointCollection
Public Sub New (initialCapacity As Integer)
Parameters
- initialCapacity
- Int32
Het aantal StylusPoint objecten dat in StylusPointCollection eerste instantie kan bevatten.
Uitzonderingen
initialCapacity is negatief.
Voorbeelden
In het volgende voorbeeld worden objecten verzameld StylusPoint in de OnStylusDown methode van een aangepast besturingselement. In het voorbeeld wordt een StylusPointCollection gemaakt door zowel de StylusPointDescription als de oorspronkelijke grootte van de StylusPointCollection.
StylusPointCollection stylusPoints;
protected override void OnStylusDown(StylusDownEventArgs e)
{
base.OnStylusDown(e);
StylusPointCollection eventPoints = e.GetStylusPoints(this);
// Create a new StylusPointCollection using the StylusPointDescription
// from the stylus points in the StylusDownEventArgs.
stylusPoints = new StylusPointCollection(eventPoints.Description, eventPoints.Count);
stylusPoints.Add(eventPoints);
}
Private stylusPoints As StylusPointCollection
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)
MyBase.OnStylusDown(e)
Dim eventPoints As StylusPointCollection = e.GetStylusPoints(Me)
' Create a new StylusPointCollection using the StylusPointDescription
' from the stylus points in the StylusDownEventArgs.
stylusPoints = New StylusPointCollection(eventPoints.Description, eventPoints.Count)
stylusPoints.Add(eventPoints)
End Sub
Opmerkingen
Wanneer u de StylusPointCollection constructor gebruikt om een nieuwe StylusPointCollectionte maken, geeft u dit initialCapacityop. U kunt echter meer StylusPoint objecten toevoegen door de Add methode aan te roepen.
Van toepassing op
StylusPointCollection(StylusPointDescription)
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse die de eigenschappen bevat die zijn opgegeven in de StylusPointDescription.
public:
StylusPointCollection(System::Windows::Input::StylusPointDescription ^ stylusPointDescription);
public StylusPointCollection(System.Windows.Input.StylusPointDescription stylusPointDescription);
new System.Windows.Input.StylusPointCollection : System.Windows.Input.StylusPointDescription -> System.Windows.Input.StylusPointCollection
Public Sub New (stylusPointDescription As StylusPointDescription)
Parameters
- stylusPointDescription
- StylusPointDescription
A StylusPointDescription die de aanvullende eigenschappen specificeert die in elk StylusPointbestand zijn opgeslagen.
Uitzonderingen
stylusPointDescription is null.
Voorbeelden
In het volgende voorbeeld worden objecten verzameld StylusPoint in de OnStylusDown methode van een aangepast besturingselement. In het voorbeeld wordt een StylusPointCollection gemaakt door de StylusPointDescription en de oorspronkelijke grootte van de StylusPointCollection.
StylusPointCollection stylusPoints;
protected override void OnStylusDown(StylusDownEventArgs e)
{
base.OnStylusDown(e);
StylusPointCollection eventPoints = e.GetStylusPoints(this);
// Create a new StylusPointCollection using the StylusPointDescription
// from the stylus points in the StylusDownEventArgs.
stylusPoints = new StylusPointCollection(eventPoints.Description, eventPoints.Count);
stylusPoints.Add(eventPoints);
}
Private stylusPoints As StylusPointCollection
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)
MyBase.OnStylusDown(e)
Dim eventPoints As StylusPointCollection = e.GetStylusPoints(Me)
' Create a new StylusPointCollection using the StylusPointDescription
' from the stylus points in the StylusDownEventArgs.
stylusPoints = New StylusPointCollection(eventPoints.Description, eventPoints.Count)
stylusPoints.Add(eventPoints)
End Sub
Opmerkingen
Alle StylusPoint objecten die aan de StylusPointCollection objecten zijn toegevoegd, moeten een StylusPointDescription object hebben dat compatibel is met stylusPointDescription.
Van toepassing op
StylusPointCollection(StylusPointDescription, Int32)
Initialiseert een nieuw exemplaar van de StylusPointCollection klasse die de opgegeven grootte is en bevat de eigenschappen die zijn opgegeven in de StylusPointDescription.
public:
StylusPointCollection(System::Windows::Input::StylusPointDescription ^ stylusPointDescription, int initialCapacity);
public StylusPointCollection(System.Windows.Input.StylusPointDescription stylusPointDescription, int initialCapacity);
new System.Windows.Input.StylusPointCollection : System.Windows.Input.StylusPointDescription * int -> System.Windows.Input.StylusPointCollection
Public Sub New (stylusPointDescription As StylusPointDescription, initialCapacity As Integer)
Parameters
- stylusPointDescription
- StylusPointDescription
A StylusPointDescription die de aanvullende eigenschappen specificeert die in elk StylusPointbestand zijn opgeslagen.
- initialCapacity
- Int32
Het aantal StylusPoint objecten dat in StylusPointCollection eerste instantie kan bevatten.
Uitzonderingen
initialCapacity is negatief.
stylusPointDescription is null.
Voorbeelden
In het volgende voorbeeld worden objecten verzameld StylusPoint in de OnStylusDown methode van een aangepast besturingselement. In het voorbeeld wordt een StylusPointCollection gemaakt door de StylusPointDescription en de oorspronkelijke grootte van de StylusPointCollection.
StylusPointCollection stylusPoints;
protected override void OnStylusDown(StylusDownEventArgs e)
{
base.OnStylusDown(e);
StylusPointCollection eventPoints = e.GetStylusPoints(this);
// Create a new StylusPointCollection using the StylusPointDescription
// from the stylus points in the StylusDownEventArgs.
stylusPoints = new StylusPointCollection(eventPoints.Description, eventPoints.Count);
stylusPoints.Add(eventPoints);
}
Private stylusPoints As StylusPointCollection
Protected Overrides Sub OnStylusDown(ByVal e As StylusDownEventArgs)
MyBase.OnStylusDown(e)
Dim eventPoints As StylusPointCollection = e.GetStylusPoints(Me)
' Create a new StylusPointCollection using the StylusPointDescription
' from the stylus points in the StylusDownEventArgs.
stylusPoints = New StylusPointCollection(eventPoints.Description, eventPoints.Count)
stylusPoints.Add(eventPoints)
End Sub
Opmerkingen
Wanneer u de StylusPointCollection constructor gebruikt om een nieuwe StylusPointCollectionte maken, wordt deze StylusPointCollection gemaakt met de capaciteit voor het opgegeven aantal StylusPoint objecten. U kunt meer StylusPoint objecten toevoegen dan initialCapacity door de methode aan te Add roepen.