Condividi tramite


StylusPointCollection.Add(StylusPointCollection) Metodo

Definizione

Aggiunge l'oggetto StylusPointCollection specificato all'oggetto StylusPointCollection corrente.

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)

Parametri

stylusPoints
StylusPointCollection

Oggetto StylusPointCollection da aggiungere all'oggetto StylusPointCollection corrente.

Eccezioni

stylusPoints è null.

L'oggetto StylusPointDescription di stylusPoints non è compatibile con la proprietà Description.

Esempio

Nell'esempio seguente vengono StylusPoint raccolti oggetti nel OnStylusDown metodo di un controllo personalizzato.

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

Si applica a