UIElement.StylusPlugIns Propriété

Définition

Obtient une collection de tous les objets plug-in de stylet (personnalisation) associés à cet élément.

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

Valeur de propriété

Collection de plug-ins de stylet, en tant que collection spécialisée.

Exemples

L’exemple suivant crée une DynamicRenderer instance et l’ajoute à la StylusPlugIns collection pour un contrôle de gestion d’encre personnalisé.

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

Remarques

Voici un exemple de contrôle qui remplit cette collection InkCanvas. InkCanvas ajoute l’élément DynamicRenderer de collection, qui permet d’interagir avec l’entrée DynamicRenderer de stylet et de produire le rendu unique en réponse aux événements pilotés par le stylet.

Pour plus d’informations sur la création de plug-ins personnalisés qui peuvent recevoir et interpréter des entrées de stylet, consultez Intercepting Input from the Stylus.

S’applique à

Voir aussi