UIElement.StylusPlugIns Vlastnost

Definice

Získá kolekci všech stylus plug-in (přizpůsobení) objekty přidružené k tomuto prvku.

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

Hodnota vlastnosti

Kolekce perových modulů plug-in, jako specializovaná kolekce.

Příklady

Následující příklad vytvoří DynamicRenderer instanci a přidá ji do StylusPlugIns kolekce pro vlastní ovládací prvek zpracování rukopisu.

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

Poznámky

Příkladem ovládacího prvku, který naplní tuto kolekci, je InkCanvas. InkCanvasDynamicRenderer přidá položku jako kolekci, která umožňuje DynamicRenderer interakci se vstupem pera a vytvořit jedinečné vykreslování v reakci na události řízené perem.

Informace o vytváření vlastních modulů plug-in, které mohou přijímat a interpretovat vstup pera, najdete v tématu Zachycení vstupu z pera.

Platí pro

Viz také