IAmbientProvider.GetAllAmbientValues 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回请求范围的环境类型或属性信息项的可枚举集。
重载
| 名称 | 说明 |
|---|---|
| GetAllAmbientValues(XamlType[]) |
返回请求类型的可能环境类型的可枚举对象实例集。 |
| GetAllAmbientValues(IEnumerable<XamlType>, XamlMember[]) |
返回所请求的属性集的环境属性信息项的可枚举集。 |
| GetAllAmbientValues(IEnumerable<XamlType>, Boolean, IEnumerable<XamlType>, XamlMember[]) |
返回所请求的类型和属性集的环境属性信息项的可枚举集。 |
GetAllAmbientValues(XamlType[])
返回请求类型的可能环境类型的可枚举对象实例集。
public:
System::Collections::Generic::IEnumerable<System::Object ^> ^ GetAllAmbientValues(... cli::array <System::Xaml::XamlType ^> ^ types);
public System.Collections.Generic.IEnumerable<object> GetAllAmbientValues(params System.Xaml.XamlType[] types);
abstract member GetAllAmbientValues : System.Xaml.XamlType[] -> seq<obj>
Public Function GetAllAmbientValues (ParamArray types As XamlType()) As IEnumerable(Of Object)
参数
- types
- XamlType[]
要从中检索环境类型信息的类型集。
返回
一组可枚举的对象,表示所请求的 XamlType 标识符集的值。
适用于
GetAllAmbientValues(IEnumerable<XamlType>, XamlMember[])
返回所请求的属性集的环境属性信息项的可枚举集。
public:
System::Collections::Generic::IEnumerable<System::Xaml::AmbientPropertyValue ^> ^ GetAllAmbientValues(System::Collections::Generic::IEnumerable<System::Xaml::XamlType ^> ^ ceilingTypes, ... cli::array <System::Xaml::XamlMember ^> ^ properties);
public System.Collections.Generic.IEnumerable<System.Xaml.AmbientPropertyValue> GetAllAmbientValues(System.Collections.Generic.IEnumerable<System.Xaml.XamlType> ceilingTypes, params System.Xaml.XamlMember[] properties);
abstract member GetAllAmbientValues : seq<System.Xaml.XamlType> * System.Xaml.XamlMember[] -> seq<System.Xaml.AmbientPropertyValue>
Public Function GetAllAmbientValues (ceilingTypes As IEnumerable(Of XamlType), ParamArray properties As XamlMember()) As IEnumerable(Of AmbientPropertyValue)
参数
- ceilingTypes
- IEnumerable<XamlType>
指定在对象图中向上遍历时应停止计算的一个或多个类型。 此类型保存所需的环境属性。 可为 null。
- properties
- XamlMember[]
指定一个或多个属性标识符对象,这些对象标识要被视为环境的属性。
返回
请求的属性集的环境属性信息项的可枚举集。 返回的每个 AmbientPropertyValue 属性信息将与其中一个输入 properties匹配。
注解
返回的每个 AmbientPropertyValue 属性都包含 XamlMember 标识符和属性值。
适用于
GetAllAmbientValues(IEnumerable<XamlType>, Boolean, IEnumerable<XamlType>, XamlMember[])
返回所请求的类型和属性集的环境属性信息项的可枚举集。
public:
System::Collections::Generic::IEnumerable<System::Xaml::AmbientPropertyValue ^> ^ GetAllAmbientValues(System::Collections::Generic::IEnumerable<System::Xaml::XamlType ^> ^ ceilingTypes, bool searchLiveStackOnly, System::Collections::Generic::IEnumerable<System::Xaml::XamlType ^> ^ types, ... cli::array <System::Xaml::XamlMember ^> ^ properties);
public System.Collections.Generic.IEnumerable<System.Xaml.AmbientPropertyValue> GetAllAmbientValues(System.Collections.Generic.IEnumerable<System.Xaml.XamlType> ceilingTypes, bool searchLiveStackOnly, System.Collections.Generic.IEnumerable<System.Xaml.XamlType> types, params System.Xaml.XamlMember[] properties);
abstract member GetAllAmbientValues : seq<System.Xaml.XamlType> * bool * seq<System.Xaml.XamlType> * System.Xaml.XamlMember[] -> seq<System.Xaml.AmbientPropertyValue>
Public Function GetAllAmbientValues (ceilingTypes As IEnumerable(Of XamlType), searchLiveStackOnly As Boolean, types As IEnumerable(Of XamlType), ParamArray properties As XamlMember()) As IEnumerable(Of AmbientPropertyValue)
参数
- ceilingTypes
- IEnumerable<XamlType>
指定在对象图中向上遍历时应停止计算的一个或多个类型。 此类型保存所需的环境属性。 可为 null。
- searchLiveStackOnly
- Boolean
true 不使用已保存的上下文; false 使用保存的上下文。 默认值为 false。
- types
- IEnumerable<XamlType>
指定一个或多个类型标识符对象,这些对象标识要被视为环境的类型。
- properties
- XamlMember[]
指定一个或多个属性标识符对象,这些对象标识要被视为环境的属性。
返回
所请求的类型和属性集的环境属性信息项的可枚举集。 返回的每个 AmbientPropertyValue 属性信息将匹配其中一个输入 types 或 properties。
注解
返回的每个 AmbientPropertyValue 属性都包含 XamlMember 标识符和属性值。
此特定 GetAllAmbientValues 重载可以在同一个传递树中搜索环境类型和环境属性。 使用此重载会导致返回值中的项的顺序不同于 GetAllAmbientValues(IEnumerable<XamlType>, XamlMember[]) 或 GetAllAmbientValues(XamlType[])。
此重载还允许搜索不使用任何已保存的上下文。 如果保存的上下文可用,则 GetAllAmbientValues(IEnumerable<XamlType>, XamlMember[]) 隐式使用或 GetAllAmbientValues(XamlType[]) 重载(它们始终像隐式 searchLiveStackOnly 参数一 false样)。 保存上下文的概念可能由特定 XAML 架构上下文或包含 XAML 的框架以不同的方式进行处理。 在WPF XAML 实现中,保存的上下文用于模板扩展以及其他功能区域。