Επεξεργασία

Κοινή χρήση μέσω


ControlDesigner.Invalidate Method

Definition

Invalidates the control as displayed on the design surface and causes the design host to call the OnPaint(PaintEventArgs) method.

Overloads

Invalidate(Rectangle)

Invalidates the specified area of the control that is displayed on the design surface and signals the control designer to redraw the control.

Invalidate()

Invalidates the whole area of the control that is displayed on the design surface and signals the control designer to redraw the control.

Remarks

Calling UpdateDesignTimeHtml method also calls Invalidate method.

Invalidate(Rectangle)

Invalidates the specified area of the control that is displayed on the design surface and signals the control designer to redraw the control.

public:
 void Invalidate(System::Drawing::Rectangle rectangle);
public void Invalidate (System.Drawing.Rectangle rectangle);
member this.Invalidate : System.Drawing.Rectangle -> unit
Public Sub Invalidate (rectangle As Rectangle)

Parameters

rectangle
Rectangle

A Rectangle object that represents the area to invalidate, relative to the upper-left corner of the control.

Remarks

To enable the control designer to handle paint events, use the SetViewFlags method in the Initialize method.

The Invalidate method provides the design host with a way to instruct the control designer to redraw a specific part of the control.

See also

Applies to

Invalidate()

Invalidates the whole area of the control that is displayed on the design surface and signals the control designer to redraw the control.

public:
 void Invalidate();
public void Invalidate ();
member this.Invalidate : unit -> unit
Public Sub Invalidate ()

Remarks

To enable the control designer to handle paint events, use the SetViewFlags method in the Initialize method.

The Invalidate method provides the design host with a way to instruct the control designer to redraw the control. Essentially, this is the same as calling UpdateDesignTimeHtml method, because it causes the whole control to be redrawn.

See also

Applies to