ControlDesigner.Invalidate Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應