다음을 통해 공유


DynamicRenderer.Enabled Property

DynamicRenderer.Enabled Property

Turns dynamic rendering on and off.

Definition

Visual Basic .NET Public Property Enabled As Boolean
C# public bool Enabled { get; set; }
Managed C++ public: __property bool* get_Enabled();
public: __property void set_Enabled(bool*);

Property Value

System.Boolean. Whether or not dynamic rendering is on.

This property is read/write.

true Dynamic rendering is on.
false Default. Dynamic rendering is off.

Exceptions

COMException Leave Site:
ObjectDisposedException Leave Site: The DynamicRenderer object is disposed.

Examples

[C#]

This C# example shows the event handler for the Load Leave Site event for a form that implements IStylusAsyncPlugin. A new instance of a DynamicRenderer object, theDynamicRenderer, and a RealTimeStylus, theRealTimeStylus, are initialized, associated with the form's handle, and enabled.

using Microsoft.StylusInput;
// ...
private RealTimeStylus theRealTimeStylus;
private DynamicRenderer theDynamicRenderer;
// ...
private void InkCollection_Load(object sender, System.EventArgs e)
{
    theDynamicRenderer = new DynamicRenderer(Handle);
    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;
}

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example shows the event handler for the Load Leave Site event for a form that implements IStylusAsyncPlugin. A new instance of a InkCollector object, theDynamicRenderer, and a RealTimeStylus, theRealTimeStylus, are initialized, associated with the form, and enabled.

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