DekGenius.com
[ Team LiB ] Previous Section Next Section

DesignOnlyAttribute

System.ComponentModel (system.dll)sealed class

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

    [ Team LiB ] Previous Section Next Section