Compartir a través de


StylusPointCollection.Add(StylusPointCollection) Método

Definición

Agrega la colección StylusPointCollection a la colección StylusPointCollection actual.

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)

Parámetros

stylusPoints
StylusPointCollection

StylusPointCollection que se va a agregar a la StylusPointCollection actual.

Excepciones

stylusPoints es null.

El objeto StylusPointDescription de stylusPoints no es compatible con la propiedad Description.

Ejemplos

En el ejemplo siguiente se recopilan StylusPoint objetos en el OnStylusDown método de un control personalizado.

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

Se aplica a