Name
DesignOnlyAttribute
Synopsis
You can mark a property with this attribute to indicate that its value can be modified only at design time. This indicates that no code will be generated when the user changes the property in the designer.
Compare this with the ReadOnlyAttribute
, which
will prevent the designer from modifying the value.
public sealed class DesignOnlyAttribute : Attribute { // Public Constructors public DesignOnlyAttribute(bool isDesignOnly); // Public Static Fields public static readonly DesignOnlyAttribute Default; // =System.ComponentModel.DesignOnlyAttribute public static readonly DesignOnlyAttribute No; // =System.ComponentModel.DesignOnlyAttribute public static readonly DesignOnlyAttribute Yes; // =System.ComponentModel.DesignOnlyAttribute // Public Instance Properties public bool IsDesignOnly{get; } // Public Instance Methods public override bool Equals(object obj); // overrides Attribute public override int GetHashCode(); // overrides Attribute public override bool IsDefaultAttribute(); // overrides Attribute }
Hierarchy
System.Object
→ System.Attribute → DesignOnlyAttribute
Valid On
All
Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.