System.Windows.Forms.AmbientProperties Class

Provides ambient property values to top-level controls.

See Also: AmbientProperties Members


public sealed class AmbientProperties


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 System.ComponentModel.Component.Site property. If the control is not sited, the site does not support ambient properties, or the property is not set on the System.Windows.Forms.AmbientProperties object, the System.Windows.Forms.Control uses its own default values. Some objects derived from the System.Windows.Forms.Control class might set the property even if you do not. For example, the System.Windows.Forms.Form class always sets the Control.ForeColor and Control.BackColor properties.


Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0,