StylusPointCollection.Add(StylusPointCollection) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Fügt den angegebenen StylusPointCollection Wert zum aktuellen StylusPointCollectionHinzu.
public:
void Add(System::Windows::Input::StylusPointCollection ^ stylusPoints);
public void Add(System.Windows.Input.StylusPointCollection stylusPoints);
override this.Add : System.Windows.Input.StylusPointCollection -> unit
Public Sub Add (stylusPoints As StylusPointCollection)
Parameter
- stylusPoints
- StylusPointCollection
The StylusPointCollection to add to the current StylusPointCollection.
Ausnahmen
stylusPoints ist null.
Das StylusPointDescription von stylusPoints ist nicht mit der Description Eigenschaft kompatibel.
Beispiele
Im folgenden Beispiel werden Objekte in der StylusPoint Methode eines benutzerdefinierten Steuerelements gesammeltOnStylusDown.
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