See Also: DesignerSerializationVisibilityAttribute
public sealed class DesignerSerializationVisibilityAttribute : Attribute
When a serializer persists the persistable state of a design mode document, it often adds code to the initialization method of components to persist values of properties that have been set at design time. This happens by default for most basic types, if no attribute has been set to direct other behavior.
With the DesignerSerializationVisibilityAttribute, you can indicate whether the value for a property is DesignerSerializationVisibilityAttribute.Visible, and should be persisted in initialization code, DesignerSerializationVisibilityAttribute.Hidden, and should not be persisted in initialization code, or consists of DesignerSerializationVisibilityAttribute.Content, which should have initialization code generated for each public, not hidden property of the object assigned to the property.
Members that do not have a DesignerSerializationVisibilityAttribute will be treated as though they have a DesignerSerializationVisibilityAttribute with a value of DesignerSerializationVisibility.Visible. The values of a property marked as DesignerSerializationVisibility.Visible will be serialized, if possible, by a serializer for the type. To specify custom serialization for a particular type or property, use the DesignerSerializerAttribute.
For more information, see Extending Metadata Using Attributes.
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 220.127.116.11, 18.104.22.168
The members of System.ComponentModel.DesignerSerializationVisibilityAttribute are listed below.
See Also: Attribute
Specifies that a serializer should serialize the contents of the property, rather than the property itself. This field is read-only.
Specifies the default value, which is DesignerSerializationVisibilityAttribute.Visible, that is, a visual designer uses default rules to generate the value of a property. This static field is read-only.
Specifies that a serializer should not serialize the value of the property. This static field is read-only.
Specifies that a serializer should be allowed to serialize the value of the property. This static field is read-only.