次の方法で共有


RealTimeStylus.AsyncPluginCollection プロパティ

RealTimeStylus オブジェクトからタブレット ペン データを受け取る IStylusAsyncPlugin プラグインのコレクションを取得します。

名前空間 :  Microsoft.StylusInput
アセンブリ :  Microsoft.Ink (Microsoft.Ink.dll 内)

構文

'宣言
Public ReadOnly Property AsyncPluginCollection As StylusAsyncPluginCollection
'使用
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

プロパティ値

型 : Microsoft.StylusInput.StylusAsyncPluginCollection
RealTimeStylus オブジェクトからタブレット ペン データを受け取る IStylusAsyncPlugin プラグインのコレクション。

この Microsoft Visual C# .NET の例は、フォームの Load イベント ハンドラのスニペットです。これにより、GestureRecognizerDynamicRenderer、および 2 つの RealTimeStylus オブジェクトを作成し、カスケードされた RealTimeStylus モデルのオブジェクトをアタッチして、RealTimeStylus オブジェクトを介して動的レンダリング、ジェスチャ認識、タブレット ペン データの収集を有効にします。GestureRecognizer オブジェクトは、単一ストロークのジェスチャを認識し、Right、ChevronRight、および ArrowRightApplicationGesture だけを認識するように設定されます。プライマリ RealTimeStylus オブジェクトの WindowInputRectangle プロパティは、RealTimeStylus オブジェクトがアタッチされたコントロール全体を使用するように明示的に設定されます。フォーム自体が IStylusAsyncPlugin インターフェイスを実装し、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;

    // ...
}

プラットフォーム

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework および .NET Compact Framework では、各プラットフォームのすべてのバージョンはサポートしていません。サポートされているバージョンについては、「.NET Framework システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 3.0

参照

参照

RealTimeStylus クラス

RealTimeStylus メンバ

Microsoft.StylusInput 名前空間