UIElement.StylusPlugIns Eigenschap

Definitie

Hiermee haalt u een verzameling op van alle stylus-invoegtoepassingen (aanpassingsobjecten) die aan dit element zijn gekoppeld.

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

Waarde van eigenschap

De verzameling stylus-plug-ins, als een gespecialiseerde collectie.

Voorbeelden

In het volgende voorbeeld wordt een DynamicRenderer exemplaar gemaakt en toegevoegd aan de StylusPlugIns verzameling voor een aangepast besturingselement voor inktverwerking.

// 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)

Opmerkingen

Een voorbeeld van een besturingselement dat deze verzameling vult, is InkCanvas. InkCanvas voegt het DynamicRenderer als een verzamelingsitem toe, waarmee de DynamicRenderer stylus-invoer kan worden gebruikt en de unieke rendering kan worden geproduceerd als reactie op stylusgestuurde gebeurtenissen.

Zie Intercepting Input van de Stylus voor informatie over het maken van aangepaste invoegtoepassingen die stylusinvoer kunnen ontvangen en interpreteren.

Van toepassing op

Zie ook