Share via


InkOverlay.AutoRedraw Property

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

Namespace: Microsoft.Ink
Assembly: Microsoft.Ink (in microsoft.ink.dll)

Syntax

'Declaration
Public Property AutoRedraw As Boolean
'Usage
Dim instance As InkOverlay
Dim value As Boolean

value = instance.AutoRedraw

instance.AutoRedraw = value
public bool AutoRedraw { get; set; }
public:
property bool AutoRedraw {
    bool get ();
    void set (bool value);
}
/** @property */
public boolean get_AutoRedraw ()

/** @property */
public void set_AutoRedraw (boolean value)
public function get AutoRedraw () : boolean

public function set AutoRedraw (value : boolean)
Not applicable.

Property Value

Value that specifies whether the InkOverlay object repaints the ink when the window is invalidated. true if the InkOverlay object repaints the ink when the window is invalidated; otherwise, false.

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 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 event to modify the InvalidateEventArgsInvalidateEventArgs object.

Example

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

bool isAutoRedrawSet = theInkOverlay.AutoRedraw;

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

Dim isAutoRedrawSet As Boolean = theInkOverlay.AutoRedraw

Platforms

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Framework

Supported in: 3.0

See Also

Reference

InkOverlay Class
InkOverlay Members
Microsoft.Ink Namespace
InkOverlay.DynamicRendering
InkOverlay.OnPainted