System.Design 2.0.0.0 System.Attribute System.AttributeUsage(System.AttributeTargets.Class)

Apply the attribute to a control designer class to indicate the type of preview control that is supported by the control designer. Use this attribute to change a preview control for design-time rendering without affecting the actual persisted instance of the associated control.

Typically, you specify the when declaring a custom designer class that is derived from the class. The value of the property for the attribute determines the behavior for the and members in the base class.

Set the 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 property to false to indicate that the designer returns the control instance, specifically the property, from the method. Changes to the control object are persisted.

For example, the class is marked with the set to true. The designer uses the preview control with the automatic style formatting task, which allows the user to preview various autoformat styles that can be applied to the calendar. As the user selects different autoformat styles in the user interface, the selected style scheme is applied to the preview control. Applying a new style to the preview control does not change the scheme that is applied to the instance of the control in the designer.

If the is not specified in the control designer declaration, the behavior is equivalent to specifying the as false.

Designer classes derived from the class can override the and members, and ignore the attribute. To determine the expected behavior for and , see the reference documentation for the derived control designer class.

For general information about using attributes, see Attributes Overview and Extending Metadata Using Attributes. For more information about design-time attributes, see Attributes and Design-Time Support.

Indicates whether a control designer requires a preview instance of the control at design time. This class cannot be inherited.

- Constructor
  2.0.0.0

  Typically, you do not need to create an instance of the class directly. Apply the to the class declaration of the custom control designer in the source code.

  Initializes a new instance of the class and sets the initial value of the property.

  The initial value to assign for .
- Field
  2.0.0.0
  System.Web.UI.Design.SupportsPreviewControlAttribute

  The property of the field is set to false.

  Use the method to determine whether the value for the property is set to the default preview value.

  Gets an instance of the class that is set to the default preview value. This field is read-only.

- Method
  2.0.0.0
  System.Boolean ``

  The method overrides the method.

  The method compares two instances based on the value of their properties.

  Determines whether the specified object represents the same preview attribute setting as the current instance of the class.

  true if is a attribute and its value is the same as this instance of ; otherwise, false.

  The object to compare with the current instance of .
- Method
  2.0.0.0
  System.Int32

  The method overrides the method.

  The method generates the same hash code for two objects that are equal according to the method. The hash code is suitable for use in hashing algorithms and data structures, such as hash tables.

  Returns the hash code for this instance of the class.

  A 32-bit signed integer hash code for the current instance of .

- Method
  2.0.0.0
  System.Boolean

  The method compares the value for the property of the current object with the value for the property of the static field.

  Indicates whether the current instance of the class is set to the default preview attribute value.

  true if the current instance of is equal to the default preview attribute value; otherwise, false.

- Property
  2.0.0.0
  System.Boolean To be added.

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

  Set the 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 property to false to indicate that the designer returns the control instance, specifically the property, from the method. Changes to the control object are persisted.

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