BitmapProperties.SetPropertiesAsync 方法

定義

以非同步方式設定一或多個點陣圖屬性。

public:
 virtual IAsyncAction ^ SetPropertiesAsync(IIterable<IKeyValuePair<Platform::String ^, BitmapTypedValue ^> ^> ^ propertiesToSet) = SetPropertiesAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction SetPropertiesAsync(IIterable<IKeyValuePair<winrt::hstring, BitmapTypedValue const&>> const& propertiesToSet);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction SetPropertiesAsync(IEnumerable<KeyValuePair<string,BitmapTypedValue>> propertiesToSet);
function setPropertiesAsync(propertiesToSet)
Public Function SetPropertiesAsync (propertiesToSet As IEnumerable(Of KeyValuePair(Of String, BitmapTypedValue))) As IAsyncAction

參數

propertiesToSet

IIterable<IKeyValuePair<String,BitmapTypedValue>>

IEnumerable<KeyValuePair<String,BitmapTypedValue>>

IIterable<IKeyValuePair<Platform::String,BitmapTypedValue>>

IIterable<IKeyValuePair<winrt::hstring,BitmapTypedValue>>

索引鍵/值組的集合,表示要設定的點陣圖屬性。 每個索引鍵都是包含 Windows 屬性或中繼資料查詢的字串,對應的值為 BitmapTypedValue ,其中包含資料和正確的 PropertyType

傳回

物件,以非同步方式管理點陣圖屬性的設定。

屬性

備註

使用 BitmapPropertySet 來儲存您想要在編碼器上設定的中繼資料專案。 每個中繼資料專案都是索引鍵/值組。

索引鍵是識別要設定之中繼資料專案的字串。 BitmapEncoder 接受一些 Windows 屬性,以及使用 WIC 中繼資料查詢語言建構的查詢。 如需支援的 Windows 屬性清單,請參閱 支援的 Windows 屬性。 如需支援的 WIC 中繼資料查詢摘要,請參閱 WIC 原生影像格式中繼資料查詢 主題。

此值是 BitmapTypedValue ,可讓您將實際的中繼資料值與明確的資料類型產生關聯, (Windows.Foundation.PropertyType) 。

每個影像格式都有每個點陣圖屬性類型的特定需求,而且您必須確定已針對選取的屬性正確設定每個BitmapTypedValueType欄位。 例如, System.Photo.Orientation Windows 屬性會儲存在檔案中做為 UInt16,因此 Type 欄位必須設定為 UInt16。 如需 Windows 屬性類型的詳細資訊,請參閱 相片中繼資料原則。 如需 Windows 映像元件中繼資料查詢類型的詳細資訊,請參閱 原生影像格式中繼資料查詢

適用於

另請參閱