AmbientProperties Class
TOC
Collapse the table of content
Expand the table of content

AmbientProperties Class

 

Provides ambient property values to top-level controls.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

System.Object
  System.Windows.Forms.AmbientProperties

[<Sealed>]
type AmbientProperties = class end

NameDescription
System_CAPS_pubmethodAmbientProperties()

Initializes a new instance of the AmbientProperties class.

NameDescription
System_CAPS_pubpropertyBackColor

Gets or sets the ambient background color of an object.

System_CAPS_pubpropertyCursor

Gets or sets the ambient cursor of an object.

System_CAPS_pubpropertyFont

Gets or sets the ambient font of an object.

System_CAPS_pubpropertyForeColor

Gets or sets the ambient foreground color of an object.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

An ambient property is a property on a control that, if not set, is retrieved from the parent control. If the control does not have a parent and the property is not set, the control tries to find the value of the ambient property through the Site property. If the control is not sited, the site does not support ambient properties, or the property is not set on the AmbientProperties object, the Control uses its own default values. Some objects derived from the Control class might set the property even if you do not. For example, the Form class always sets the ForeColor and BackColor properties.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft