Share via


BitmapProperties.SetPropertiesAsync Method

Definition

Asynchronously sets one or more bitmap properties.

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

Parameters

propertiesToSet

IIterable<IKeyValuePair<String,BitmapTypedValue>>

IEnumerable<KeyValuePair<String,BitmapTypedValue>>

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

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

A collection of key-value pairs representing the bitmap properties to be set. Each key is a string containing the Windows property or metadata query, and the corresponding value is a BitmapTypedValue with the data and the correct PropertyType.

Returns

Object that manages the setting of the bitmap properties asynchronously.

Attributes

Remarks

Use a BitmapPropertySet to store metadata items that you want to set on the encoder. Each metadata item is a key-value pair.

The key is a string that identifies the metadata item to set. BitmapEncoder accepts some Windows properties as well as queries constructed using the WIC metadata query language. For a list of supported Windows properties, see Supported Windows Properties. For a summary of supported WIC metadata queries, see the WIC Native Image Format Metadata Queries topic.

The value is a BitmapTypedValue which allows you to associate the actual metadata value with an explicit data type (Windows.Foundation.PropertyType).

Each image format has specific requirements around the type of every bitmap property, and you must ensure that the Type field of each BitmapTypedValue is correctly set for the selected property. For example, the System.Photo.Orientation Windows property is stored in the file as a UInt16, and therefore the Type field must be set to UInt16. For more info about Windows property types, see Photo Metadata Policies. For more info about Windows Imaging Component metadata query types, see Native Image Format Metadata Queries.

Applies to

See also