DesignerAutoFormat::GetPreviewControl Method
Returns a copy of the associated control in order to provide a preview before applying the format to the control.
Assembly: System.Design (in System.Design.dll)
Parameters
- runtimeControl
- Type: System.Web.UI::Control
A run-time version of the Web server control.
Return Value
Type: System.Web.UI::ControlThe GetPreviewControl method returns a copy of the associated Web server control.
The GetPreviewControl method is used by visual designers, such as Visual Studio 2005, in an AutoFormat dialog box to display a formatted run-time preview of the control at design time before applying the format to the actual control.
Regardless of the setting of the SupportsPreviewControlAttribute attribute for the ControlDesigner object, the GetPreviewControl method returns a copy of the control in the runtimeControl parameter.
Notes to InheritorsYou can override the GetPreviewControl method in the following situations:
The size of the returned control will be different from the original control.
The control must be populated with sample data in order to present a sufficient preview.
- 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.