RealTimeStylus.SyncPluginCollection 属性

获取从 RealTimeStylus 对象接收 Tablet 笔数据的 IStylusSyncPlugin 插件的集合。

命名空间:  Microsoft.StylusInput
程序集:  Microsoft.Ink(在 Microsoft.Ink.dll 中)

语法

声明
Public ReadOnly Property SyncPluginCollection As StylusSyncPluginCollection
用法
Dim instance As RealTimeStylus
Dim value As StylusSyncPluginCollection

value = instance.SyncPluginCollection
public StylusSyncPluginCollection SyncPluginCollection { get; }
public:
property StylusSyncPluginCollection^ SyncPluginCollection {
    StylusSyncPluginCollection^ get ();
}
/** @property */
public StylusSyncPluginCollection get_SyncPluginCollection()
public function get SyncPluginCollection () : StylusSyncPluginCollection

属性值

类型:Microsoft.StylusInput.StylusSyncPluginCollection
RealTimeStylus 对象接收 Tablet 笔数据的 IStylusSyncPlugin 插件的集合。

示例

此 Microsoft Visual C# .NET 示例是窗体的 Load 事件处理程序中的代码段,它创建一个 GestureRecognizerDynamicRenderer 和两个 RealTimeStylus 对象,在级联的 RealTimeStylus 模型中附加对象,并通过 RealTimeStylus 对象启用动态呈现、笔势识别和 Tablet 笔数据收集。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 命名空间