取得或設定值,這個值會開啟及關閉動態呈現功能。
命名空間: 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# 範例會示範表單之 Load (英文) 事件的事件處理常式,該表單會實作 IStylusAsyncPlugin 介面。接著在事件處理常式中,會初始化 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 範例會示範表單之 Load (英文) 事件的事件處理常式,該表單會實作 IStylusAsyncPlugin 介面。接著在事件處理常式中,會初始化 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