UIElement.StylusPlugIns Proprietà

Definizione

Ottiene un insieme di tutti gli oggetti dei plug-in dello stilo (personalizzazione) associati a questo elemento.

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

Valore della proprietà

StylusPlugInCollection

Insieme dei plug-in dello stilo, come insieme specializzato.

Esempio

L'esempio seguente crea un'istanza DynamicRenderer StylusPlugIns e la aggiunge alla raccolta per un controllo di gestione input penna personalizzato.

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

Commenti

Un esempio di controllo che popola questa raccolta è InkCanvas. InkCanvasaggiunge l'oggetto come elemento di raccolta, che consente DynamicRenderer di interagire con l'input DynamicRenderer dello stilo e di produrre il rendering univoco in risposta agli eventi basati su stilo.

Per informazioni sulla creazione di plug-in personalizzati che possono ricevere e interpretare l'input dello stilo, vedere Intercettare l'input dallo stilo.

Si applica a

Vedi anche