DynamicRenderer.Enabled 属性

获取或设置一个值,该值打开和关闭动态呈现。

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

语法

声明
Public Property Enabled As Boolean
用法
Dim instance As DynamicRenderer
Dim value As Boolean

value = instance.Enabled

instance.Enabled = value
public bool Enabled { get; set; }
public:
property bool Enabled {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_Enabled()
/** @property */
public  void set_Enabled(boolean value)
public function get Enabled () : boolean
public function set Enabled (value : boolean)

属性值

类型:System.Boolean
如果打开动态呈现,则为 true;否则为 false。

示例

此 C# 示例演示实现 IStylusAsyncPlugin 接口的窗体的 Load 事件的事件处理程序。该事件处理程序初始化 DynamicRenderer 对象 theDynamicRenderer 以及 RealTimeStylus 对象 theRealTimeStylus 的新实例,将它们与窗体关联,然后启用这些实例。

using Microsoft.StylusInput;
// ...
private RealTimeStylus theRealTimeStylus;
private DynamicRenderer theDynamicRenderer;
// ...
private void InkCollection_Load(object sender, System.EventArgs e)
{
    theDynamicRenderer = new DynamicRenderer(this);
    theRealTimeStylus = new RealTimeStylus(this, true);

    // Add the dynamic renderer to the synchronous plugin notification chain.
    // Synchronous notifications occur on the pen thread.
    theRealTimeStylus.SyncPluginCollection.Add(theDynamicRenderer);

    // Add the form to the asynchronous plugin notification chain.  This plugin
    // will be used to collect stylus data into an ink object.  Asynchronous
    // notifications occur on the UI thread.
    theRealTimeStylus.AsyncPluginCollection.Add(this);

    // Enable the real time stylus and the dynamic renderer
    theRealTimeStylus.Enabled = true;
    theDynamicRenderer.Enabled = true;  
}

此 Microsoft Visual Basic .NET 示例演示实现 IStylusAsyncPlugin 接口的窗体的 Load 事件的事件处理程序。该事件处理程序初始化 DynamicRenderer 对象 theDynamicRenderer 以及 RealTimeStylus 对象 theRealTimeStylus 的新实例,将它们与窗体关联,然后启用这些实例。

Imports Microsoft.StylusInput
' ...
Private theRealTimeStylus As RealTimeStylus
Private theDynamicRenderer As DynamicRenderer

' ...
Private Sub InkCollector_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles MyBase.Load
    theDynamicRenderer = New DynamicRenderer(Me)
    theRealTimeStylus = New RealTimeStylus(Me, True)

    ' Add the dynamic renderer to the synchronous plugin notification chain.
    ' Synchronous notifications occur on the pen thread.
    theRealTimeStylus.SyncPluginCollection.Add(theDynamicRenderer)

    ' Add the form to the asynchronous plugin notification chain.  This plugin
    ' will be used to collect stylus data into an ink object.  Asynchronous
    ' notifications occur on the UI thread.
    theRealTimeStylus.AsyncPluginCollection.Add(Me)

    ' Enable the real time stylus and the dynamic renderer
    theRealTimeStylus.Enabled = True
    theDynamicRenderer.Enabled = True
End Sub

平台

Windows Vista, Windows XP SP2, Windows Server 2003

.NET Framework 和 .NET Compact Framework 并不是对每个平台的所有版本都提供支持。有关支持的版本的列表,请参见.NET Framework 系统要求

版本信息

.NET Framework

受以下版本支持:3.0

另请参见

参考

DynamicRenderer 类

DynamicRenderer 成员

Microsoft.StylusInput 命名空间

DynamicRenderer

IStylusAsyncPlugin

RealTimeStylus