DesignerAutoFormat.GetPreviewControl Method

Returns a copy of the associated control in order to provide a preview before applying the format to the control.

Namespace: System.Web.UI.Design
Assembly: System.Design (in system.design.dll)

public:
virtual Control^ GetPreviewControl (
	Control^ runtimeControl
)
public Control GetPreviewControl (
	Control runtimeControl
)
public function GetPreviewControl (
	runtimeControl : Control
) : Control
Not applicable.

Parameters

runtimeControl

A run-time version of the Web server control.

Return Value

The 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 Inheritors: You 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.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: