ControlDesigner.OnControlResize Method
Called when the design-time control has been resized.
[Visual Basic] Protected Overridable Sub OnControlResize() [C#] protected virtual void OnControlResize(); [C++] protected: virtual void OnControlResize(); [JScript] protected function OnControlResize();
Remarks
This method is typically only called by the design-time environment when a user action causes the control to be resized. This method may be called several times during a resize process to display the updated size of the control before the resize process is completed. The width and height properties of the control are updated before this method is called.
Example
[Visual Basic] The following code example overrides the OnControlResize method. When the control associated with the designer is resized on the design surface, this method is called. When that occurs, the code sets the IsDirty property to true and then calls the UpdateDesignTimeHtml method.
[Visual Basic]
' Override the OnControlResize method to
' set the IsDirty property to true and
' call the UpdateDesignTimeHtml method.
Overrides Protected Sub OnControlResize()
Me.IsDirty = True
Me.UpdateDesignTimeHtml
End Sub
[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
.NET Framework Security:
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries From Partially Trusted Code
See Also
ControlDesigner Class | ControlDesigner Members | System.Web.UI.Design Namespace