语言

IAmbientProvider.GetFirstAmbientValue 方法

定义

根据第一次遇到哪个属性,从请求集返回单个环境类型或属性信息项。

重载

名称 说明
GetFirstAmbientValue(XamlType[])

返回第一个匹配对象,该对象是所请求类型的可能环境类型。

GetFirstAmbientValue(IEnumerable<XamlType>, XamlMember[])

从请求的属性集中返回一个环境属性信息项,具体取决于首次遇到哪个属性。

GetFirstAmbientValue(XamlType[])

返回第一个匹配对象,该对象是所请求类型的可能环境类型。

public:
 System::Object ^ GetFirstAmbientValue(... cli::array <System::Xaml::XamlType ^> ^ types);
public object GetFirstAmbientValue(params System.Xaml.XamlType[] types);
abstract member GetFirstAmbientValue : System.Xaml.XamlType[] -> obj
Public Function GetFirstAmbientValue (ParamArray types As XamlType()) As Object

参数

types
XamlType[]

要从中检索环境类型信息的类型集。

返回

请求集的第一个结果对象。

适用于

GetFirstAmbientValue(IEnumerable<XamlType>, XamlMember[])

从请求的属性集中返回一个环境属性信息项,具体取决于首次遇到哪个属性。

public:
 System::Xaml::AmbientPropertyValue ^ GetFirstAmbientValue(System::Collections::Generic::IEnumerable<System::Xaml::XamlType ^> ^ ceilingTypes, ... cli::array <System::Xaml::XamlMember ^> ^ properties);
public System.Xaml.AmbientPropertyValue GetFirstAmbientValue(System.Collections.Generic.IEnumerable<System.Xaml.XamlType> ceilingTypes, params System.Xaml.XamlMember[] properties);
abstract member GetFirstAmbientValue : seq<System.Xaml.XamlType> * System.Xaml.XamlMember[] -> System.Xaml.AmbientPropertyValue
Public Function GetFirstAmbientValue (ceilingTypes As IEnumerable(Of XamlType), ParamArray properties As XamlMember()) As AmbientPropertyValue

参数

ceilingTypes
IEnumerable<XamlType>

指定在对象图中向上遍历时应停止计算的一个或多个类型。 此类型保存所需的环境属性。

properties
XamlMember[]

指定要被视为环境的属性的一个或多个对象。

返回

找到列表中的第一个环境属性值 properties 的单个环境属性信息项。

注解

返回的每个 AmbientPropertyValue 属性都包含 XamlMember 标识符和属性值。

适用于