次の方法で共有


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