Freigeben über


InkPicture.AutoRedraw Property

InkPicture.AutoRedraw Property

Gets or sets a value that specifies whether the InkPicture control 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 InkPicture control repaints the ink when the window is invalidated.

This property is read/write.

true Default. The InkPicture control repaints the ink when the window is invalidated.
false The InkPicture control 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 InkPicture control is automatically redrawn when the window associated with the InkPicture control 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 InkPicture control. In that case add a delegate to the InkPicture control's OnPainted event handler to draw the ink yourself or handle the inherited Invalidate Leave Site event to modify the InvalidateEventArgs Leave Site object.

Examples

[C#]

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

bool isAutoRedrawSet = theInkPicture.AutoRedraw;

[Visual Basic .NET]

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

Dim isAutoRedrawSet As Boolean = theInkPicture.AutoRedraw

See Also