System.ComponentModel.DesignOnlyAttribute Class

Specifies whether a property can only be set at design time.

See Also: DesignOnlyAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.All)]
public sealed class DesignOnlyAttribute : Attribute

Remarks

Members marked with the System.ComponentModel.DesignOnlyAttribute set to true can be set only at design time. Typically, these properties exist only at design time and do not correspond to a real property on the object at run time.

Members that either have no attribute or are marked with the System.ComponentModel.DesignOnlyAttribute set to false can be set during run time. The default is false.

A property with the System.ComponentModel.DesignOnlyAttribute set to true has its value serialized to the .resx file instead of the InitializeComponent method.

For more information, see Extending Metadata Using Attributes.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0, 4.0.0.0