AmbientProperties 类

为顶级控件提供环境属性值。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Public NotInheritable Class AmbientProperties
用法
Dim instance As AmbientProperties
public sealed class AmbientProperties
public ref class AmbientProperties sealed
public final class AmbientProperties
public final class AmbientProperties

备注

环境属性是控件上的一个属性,如果未设置的话,可从父控件中检索。如果控件没有父控件,且属性也未设置,该控件尝试通过 Site 属性查找环境属性的值。如果控件未设定位置,站点不支持环境属性,或者该属性未在 AmbientProperties 对象上设置,则 Control 使用自己的默认值。即使您不设置,从 Control 类派生的某些对象也可能设置该属性。例如,Form 类总是设置 ForeColorBackColor 属性。

继承层次结构

System.Object
  System.Windows.Forms.AmbientProperties

线程安全

此类型的任何公共静态(Visual Basic 中的 Shared)成员都是线程安全的,但不保证所有实例成员都是线程安全的。

平台

Windows 98、Windows 2000 SP4、Windows CE、Windows Millennium Edition、Windows Mobile for Pocket PC、Windows Mobile for Smartphone、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

AmbientProperties 成员
System.Windows.Forms 命名空间
Control