Partager via


RealTimeStylus.AsyncPluginCollection, propriété

Mise à jour : November 2007

Obtient la collection des plug-in IStylusAsyncPlugin qui reçoivent les données de stylet de l'objet RealTimeStylus.

Espace de noms :  Microsoft.StylusInput
Assembly :  Microsoft.Ink (dans Microsoft.Ink.dll)

Syntaxe

'Déclaration
Public ReadOnly Property AsyncPluginCollection As StylusAsyncPluginCollection
'Utilisation
Dim instance As RealTimeStylus
Dim value As StylusAsyncPluginCollection

value = instance.AsyncPluginCollection
public StylusAsyncPluginCollection AsyncPluginCollection { get; }
public:
property StylusAsyncPluginCollection^ AsyncPluginCollection {
    StylusAsyncPluginCollection^ get ();
}
/** @property */
public StylusAsyncPluginCollection get_AsyncPluginCollection()
public function get AsyncPluginCollection () : StylusAsyncPluginCollection

Valeur de propriété

Type : Microsoft.StylusInput.StylusAsyncPluginCollection
Collection des plug-in IStylusAsyncPlugin qui reçoivent les données de stylet de l'objet RealTimeStylus.

Exemples

Cet exemple Microsoft Visual C# .NET est un extrait d'un gestionnaire d'événements Load (page pouvant être en anglais) d'un formulaire, qui crée un GestureRecognizer, un DynamicRenderer et deux objets RealTimeStylus, attache les objets dans un modèle RealTimeStylus en cascade et qui active le rendu dynamique, la reconnaissance de mouvement et la collecte des données de stylet grâce à l'objet RealTimeStylus. L'objet GestureRecognizer est configuré pour reconnaître les mouvements monotraits et uniquement Right, ChevronRight et ArrowRightApplicationGesture. La propriété WindowInputRectangle de l'objet principal RealTimeStylus est explicitement définie pour utiliser la totalité du contrôle auquel l'objet RealTimeStylus est attaché. Le formulaire implémente l'interface IStylusAsyncPlugin et est attaché à l'objet RealTimeStylus.

using Microsoft.Ink;
using Microsoft.StylusInput;
using Microsoft.StylusInput.PluginData;

// ...

// The panel where the tablet pen data is collected.
private System.Windows.Forms.Panel thePanel;

// Declare the RealTimeStylus objects, the GestureRecognizer plugin,
// and the DynamicRenderer plug-in.
private Microsoft.StylusInput.RealTimeStylus thePrimaryRealTimeStylus = null;
private Microsoft.StylusInput.RealTimeStylus theSecondaryRealTimeStylus = null;
private Microsoft.StylusInput.GestureRecognizer theGestureRecognizer = null;
private Microsoft.StylusInput.DynamicRenderer theDynamicRenderer = null;

// The form's Load event handler.
private void theForm_Load(object sender, System.EventArgs e)
{
    // ...

    // Create a DynamicRenderer attached to the drawing area ,
    // and enable dynamic rendering.
    this.theDynamicRenderer = new DynamicRenderer(this.thePanel);
    this.theDynamicRenderer.Enabled = true;

    // Create a GestureRecognizer, and set it to recognize single-stroke gestures.
    this.theGestureRecognizer = new GestureRecognizer();
    this.theGestureRecognizer.MaxStrokeCount = 1;

    // Allow gesture recognition for specific gestures.
    this.theGestureRecognizer.EnableGestures( new ApplicationGesture[]
        {
            ApplicationGesture.Right,
            ApplicationGesture.ChevronRight,
            ApplicationGesture.ArrowRight
        } );

    // Enable gesture recognition.
    this.theGestureRecognizer.Enabled = true;

    // Create the primary and secondary RealTimeStylus objects.
    this.thePrimaryRealTimeStylus = new RealTimeStylus(this.thePanel);
    this.theSecondaryRealTimeStylus = new RealTimeStylus();

    // Add the secondary RealTimeStylus to the primary's asynchronous plug-in collection.
    this.thePrimaryRealTimeStylus.AsyncPluginCollection.Add(
        this.theSecondaryRealTimeStylus);

    // Add the dynamic renderer to the primary's synchronous plug-in collection.
    this.thePrimaryRealTimeStylus.SyncPluginCollection.Add(this.theDynamicRenderer);

    // Add the gesture recognizer to the secondary's synchronous plug-in collection.
    this.theSecondaryRealTimeStylus.SyncPluginCollection.Add(this.theGestureRecognizer);

    // Add the form to the secondary's asynchronous plug-in colleciton.
    this.theSecondaryRealTimeStylus.AsyncPluginCollection.Add(this);

    // Set the input rectangle to the entire panel for the RealTimeStylus.
    this.thePrimaryRealTimeStylus.WindowInputRectangle = new Rectangle(0,0,0,0);

    // Enable the RealTimeStylus, which allows notifications to flow to the plug-ins.
    this.thePrimaryRealTimeStylus.Enabled = true;

    // ...
}

Plateformes

Windows Vista, Windows XP SP2, Windows Server 2003

Le .NET Framework et le .NET Compact Framework ne prennent pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.

Informations de version

.NET Framework

Pris en charge dans : 3.0

Voir aussi

Référence

RealTimeStylus, classe

Membres RealTimeStylus

Microsoft.StylusInput, espace de noms