SupportsPreviewControlAttribute.SupportsPreviewControl Property

Note: This property is new in the .NET Framework version 2.0.

Gets a value indicating whether the control designer requires a temporary preview control at design time.

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

public:
property bool SupportsPreviewControl {
	bool get ();
}
/** @property */
public boolean get_SupportsPreviewControl ()

public function get SupportsPreviewControl () : boolean

Property Value

true if the designer uses a temporary copy of the associated control for design-time preview; false if the designer uses an instance of the Component control that is contained in the designer.

Typically, you specify a value for the SupportsPreviewControl property by applying the SupportsPreviewControlAttribute attribute to a custom designer class declaration. The value of the SupportsPreviewControl property for the SupportsPreviewControlAttribute attribute determines the behavior for the UsePreviewControl and ViewControl members in the base ControlDesigner class.

Set the SupportsPreviewControl property to true to indicate that the designer uses a temporary copy of the associated control to generate the design-time HTML. Changes to the temporary control are not persisted.

Set the SupportsPreviewControl property to false to indicate that the designer returns the control instance, specifically the Component property, from the ViewControl method. Changes to the control object are persisted.

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Show: