IAmbientProvider.GetFirstAmbientValue 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
根據首次遇到的屬性,從請求集合中回傳一個環境類型或屬性資訊項目。
多載
| 名稱 | Description |
|---|---|
| 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 碼和屬性值。