Udostępnij za pośrednictwem


StorageItemContentProperties.SavePropertiesAsync Method

Definition

Overloads

SavePropertiesAsync()

Saves all properties associated with the item.

SavePropertiesAsync(IIterable<KeyValuePair<String,Object>>)

Saves the specified properties and values associated with the item.

SavePropertiesAsync()

Saves all properties associated with the item.

public:
 virtual IAsyncAction ^ SavePropertiesAsync() = SavePropertiesAsync;
/// [Windows.Foundation.Metadata.Overload("SavePropertiesAsyncOverloadDefault")]
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction SavePropertiesAsync();
[Windows.Foundation.Metadata.Overload("SavePropertiesAsyncOverloadDefault")]
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction SavePropertiesAsync();
function savePropertiesAsync()
Public Function SavePropertiesAsync () As IAsyncAction

Returns

No object or value is returned when this method completes.

Implements

Attributes

Remarks

If any one of the property values is invalid, none of the values will be saved.

See also

Applies to

SavePropertiesAsync(IIterable<KeyValuePair<String,Object>>)

Saves the specified properties and values associated with the item.

public:
 virtual IAsyncAction ^ SavePropertiesAsync(IIterable<IKeyValuePair<Platform::String ^, Platform::Object ^> ^> ^ propertiesToSave) = SavePropertiesAsync;
/// [Windows.Foundation.Metadata.Overload("SavePropertiesAsync")]
IAsyncAction SavePropertiesAsync(IIterable<IKeyValuePair<winrt::hstring, IInspectable const&>> const& propertiesToSave);
[Windows.Foundation.Metadata.Overload("SavePropertiesAsync")]
public IAsyncAction SavePropertiesAsync(IEnumerable<KeyValuePair<string,object>> propertiesToSave);
function savePropertiesAsync(propertiesToSave)
Public Function SavePropertiesAsync (propertiesToSave As IEnumerable(Of KeyValuePair(Of String, Object))) As IAsyncAction

Parameters

propertiesToSave

IIterable<IKeyValuePair<String,Object>>

IEnumerable<KeyValuePair<String,Object>>

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

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

A collection that contains the names and values of the properties to save as key-value pairs (type IKeyValuePair).

Returns

No object or value is returned when this method completes.

Implements

M:Windows.Storage.FileProperties.IStorageItemExtraProperties.SavePropertiesAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.Object}}) M:Windows.Storage.FileProperties.IStorageItemExtraProperties.SavePropertiesAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{Platform::String,Platform::Object}}) M:Windows.Storage.FileProperties.IStorageItemExtraProperties.SavePropertiesAsync(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{winrt::hstring,IInspectable}})
Attributes

Remarks

System.ExpandoProperties

Expando properties are a set of named values associated with a storage file instance in memory. They are not saved persistently in the file system but are retained when a file is saved in the access cache.

They can be written and read by any app, and therefore provide a way to associate information with a storage file. This is useful in scenarios where a storage file is passed from one app to another to communicate extra information about that file.

Expando properties are accessed using the Windows Runtime storage API. They are retrieved as a value using RetrievePropertiesAsync with the "System.ExpandoProperties" property name. The expando properties are written using SavePropertiesAsync. That value is a property set itself so the values within it are accessed using the PropertySet programming model.

The names used to identify values in the System.ExpandoProperties set do not need to conform to the system's property naming scheme (which prefixes property names with "System"). They can be any string value.

The system defines some of the names that should be used. For example, "OriginURL" is used to communicate where a locally-stored file came from if it was downloaded from a remote source. (See Customizing the download experience.)

Apps may define and document the properties that they use so other applications can interoperate with them. For example, System.ExpandoProperties can be used to allow a provider app to pass license information to a Universal Office app, to indicate whether a file can be personal or for business.

See also

Applies to