Name

AmbientValueAttribute

Synopsis

If a control defines a property that can take an ambient value from its host, it must be decorated with this attribute. The designer will use this attribute to determine whether to persist the control’s current value, or whether to leave it to the ambient environment. You can retrieve the Value for the object that represents “use the ambient value.”


public sealed class AmbientValueAttribute : Attribute {

// Public Constructors

   public AmbientValueAttribute(bool value);

   public AmbientValueAttribute(byte value);

   public AmbientValueAttribute(char value);

   public AmbientValueAttribute(double value);

   public AmbientValueAttribute(short value);

   public AmbientValueAttribute(int value);

   public AmbientValueAttribute(long value);

   public AmbientValueAttribute(object value);

   public AmbientValueAttribute(float value);

   public AmbientValueAttribute(string value);

   public AmbientValueAttribute(Type type, string value);

// Public Instance Properties

   public object Value{get; }

// Public Instance Methods

   public override bool Equals(object obj);  // overrides Attribute

   public override int GetHashCode();  // overrides Attribute

}

Hierarchy

System.Object System.Attribute AmbientValueAttribute

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.