共用方式為


InkOverlay.AutoRedraw Property

InkOverlay.AutoRedraw Property

Gets or sets a value that specifies whether the InkOverlay object repaints the ink when the window is invalidated.

Definition

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

Property Value

System.Boolean. Value that specifies whether the InkOverlay object repaints the ink when the window is invalidated.

This property is read/write.

true Default. The InkOverlay object repaints the ink when the window is invalidated.
false The InkOverlay object does not repaint the ink when the window is invalidated.

Exceptions

ObjectDisposedException Leave Site:

Remarks

The value for AutoRedraw specifies whether or not the Ink object currently associated with InkOverlay object is automatically redrawn when the window associated with the InkOverlay object receives a Paint Leave Site event. For example, if set to true, when you minimize the window and then restore it, the ink is automatically redrawn. If set to false, when you minimize the window and then restore it, the ink disappears from view.

When AutoRedraw is false, the ink appears while inking unless the DynamicRendering property is false.

When your application is performing custom rendering or when your application is sensitive to painting issues, you can handle the repainting yourself and set the AutoRedraw property to false for the InkOverlay object. In that case add a delegate to the InkOverlay object's OnPainted event handler to draw the ink yourself or handle the underlying control's Invalidate Leave Site event to modify the InvalidateEventArgs Leave Site object.

Examples

[C#]

This C# example example returns the AutoRedraw value of an InkOverlay, theInkOverlay, as a Boolean Leave Site, isAutoRedrawSet.

bool isAutoRedrawSet = theInkOverlay.AutoRedraw;

[Visual Basic .NET]

This Microsoft® Visual Basic® .NET example returns the AutoRedraw value of an InkOverlay, theInkOverlay, as a Boolean Leave Site, isAutoRedrawSet.

Dim isAutoRedrawSet As Boolean = theInkOverlay.AutoRedraw

See Also