ApplicationDataContainerSettings Class

Definition

Provides access to the settings in a settings container. The ApplicationDataContainer.Values property returns an object that can be cast to this type.

public ref class ApplicationDataContainerSettings sealed : IIterable<IKeyValuePair<Platform::String ^, Platform::Object ^> ^>, IMap<Platform::String ^, Platform::Object ^>, IObservableMap<Platform::String ^, Platform::Object ^>, IPropertySet
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class ApplicationDataContainerSettings final : IIterable<IKeyValuePair<winrt::hstring, IInspectable const&>>, IMap<winrt::hstring, IInspectable const&>, IObservableMap<winrt::hstring, IInspectable const&>, IPropertySet
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class ApplicationDataContainerSettings : IDictionary<string,object>, IEnumerable<KeyValuePair<string,object>>, IObservableMap<string,object>, IPropertySet
Public NotInheritable Class ApplicationDataContainerSettings
Implements IDictionary(Of String, Object), IEnumerable(Of KeyValuePair(Of String, Object)), IObservableMap(Of String, Object), IPropertySet
Inheritance
Object Platform::Object IInspectable ApplicationDataContainerSettings
Attributes
Implements
IMap<K,V> IDictionary<K,V> IDictionary<String,Object> IMap<Platform::String,Platform::Object> IMap<winrt::hstring,IInspectable> IIterable<IKeyValuePair<K,V>> IEnumerable<KeyValuePair<K,V>> IEnumerable<KeyValuePair<String,Object>> IIterable<IKeyValuePair<Platform::String,Platform::Object>> IIterable<IKeyValuePair<winrt::hstring,IInspectable>> IObservableMap<String,Object> IObservableMap<Platform::String,Platform::Object> IObservableMap<winrt::hstring,IInspectable> IPropertySet

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

To get an app's local settings, do the following things. These steps are demonstrated in the LocalSettings example.

  1. Get the value of the static ApplicationData.Current property. This property returns a data store of type ApplicationData.
  2. Get the value of the data store's LocalSettings property. This property returns a data container of type ApplicationDataContainer.
  3. Read the Values property of the data container. This property returns a group of settings of type IPropertySet, which can be cast to the ApplicationDataContainerSettings type.

Collection member lists

Note that for JavaScript, ApplicationDataContainerSettings supports using an index to access items.

Properties

Size

Gets the number of related application settings.

Methods

Clear()

Removes all related application settings.

First()

Retrieves an iterator to enumerate the settings in the settings container.

GetView()

Returns a read-only snapshot of the contents of the settings container.

HasKey(String)

Determines whether there is an application setting with the specified key.

Insert(String, Object)

Inserts or replaces an application setting.

Lookup(String)

Retrieves the specified application setting.

Remove(String)

Removes the specified application setting.

Events

MapChanged

Occurs when the map changes.

Applies to

See also