UIElement.StylusPlugIns Eigenschaft

Definition

Ruft eine Auflistung aller Eingabestift-Plug-In -Objekte (Anpassung) ab, die diesem Element zugeordnet sind.

protected:
 property System::Windows::Input::StylusPlugIns::StylusPlugInCollection ^ StylusPlugIns { System::Windows::Input::StylusPlugIns::StylusPlugInCollection ^ get(); };
protected System.Windows.Input.StylusPlugIns.StylusPlugInCollection StylusPlugIns { get; }
member this.StylusPlugIns : System.Windows.Input.StylusPlugIns.StylusPlugInCollection
Protected ReadOnly Property StylusPlugIns As StylusPlugInCollection

Eigenschaftswert

Die Sammlung von Eingabestift-Plug-Ins, als spezielle Sammlung.

Beispiele

Im folgenden Beispiel wird eine DynamicRenderer Instanz erstellt und der StylusPlugIns Auflistung für ein benutzerdefiniertes Freihandbehandlungssteuerelement hinzugefügt.

// Create a DrawingAttributes to use for the 
// DynamicRenderer.
DrawingAttributes inkDA = new DrawingAttributes();
inkDA.Width = 5;
inkDA.Height = 5;
inkDA.Color = Colors.Purple;

// Add a dynamic renderer plugin that 
// draws ink as it "flows" from the stylus
DynamicRenderer dynamicRenderer1 = new DynamicRenderer();
dynamicRenderer1.DrawingAttributes = inkDA;

this.StylusPlugIns.Add(dynamicRenderer1);
inkPresenter1.AttachVisuals(dynamicRenderer1.RootVisual,
    dynamicRenderer1.DrawingAttributes);
' Create a DrawingAttributes to use for the 
' DynamicRenderer.
Dim inkDA As New DrawingAttributes()
inkDA.Width = 5
inkDA.Height = 5
inkDA.Color = Colors.Purple

' Add a dynamic renderer plugin that 
' draws ink as it "flows" from the stylus
Dim dynamicRenderer1 As New DynamicRenderer()
dynamicRenderer1.DrawingAttributes = inkDA

Me.StylusPlugIns.Add(dynamicRenderer1)
inkPresenter1.AttachVisuals(dynamicRenderer1.RootVisual, dynamicRenderer1.DrawingAttributes)

Hinweise

Ein Beispiel für ein Steuerelement, das diese Auflistung auffüllt, ist InkCanvas. InkCanvas fügt das DynamicRenderer Als Sammlungselement hinzu, das die DynamicRenderer Interaktion mit Eingabestiften ermöglicht und das einzigartige Rendering als Reaktion auf Eingabestiftgesteuerte Ereignisse erzeugt.

Informationen zum Erstellen benutzerdefinierter Plug-Ins, die Eingabestifteingaben empfangen und interpretieren können, finden Sie unter "Abfangen von Eingaben vom Eingabestift".

Gilt für:

Weitere Informationen