ApplicationDataContainerSettings ApplicationDataContainerSettings ApplicationDataContainerSettings ApplicationDataContainerSettings 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 : sealed class ApplicationDataContainerSettings : IIterable<IKeyValuePair<Platform::String, Platform::Object>>, IMap<Platform::String, Platform::Object>, IObservableMap<Platform::String, Platform::Object>, IPropertySet
struct winrt::Windows::Storage::ApplicationDataContainerSettings : IIterable<IKeyValuePair<Platform::String, Platform::Object>>, IMap<Platform::String, Platform::Object>, IObservableMap<Platform::String, Platform::Object>, IPropertySet
public sealed class ApplicationDataContainerSettings : IEnumerable<KeyValuePair<String, Object>>, IDictionary<String, Object>, IObservableMap<String, Object>, IPropertySet
Public NotInheritable Class ApplicationDataContainerSettings Implements IEnumerable<KeyValuePair<String, Object>>, IDictionary<String, Object>, IObservableMap<String, Object>, IPropertySet
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

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

Item[TKey] Item[TKey] Item[TKey] Item[TKey] Item[TKey]

Gets or sets the element with the specified key.

Keys Keys Keys Keys Keys

Gets an System.Collections.Generic.ICollection`1 containing the keys of the System.Collections.Generic.IDictionary`2.

Size Size Size Size Size

Gets the number of related application settings.

Values Values Values Values Values

Gets an System.Collections.Generic.ICollection`1 containing the values in the System.Collections.Generic.IDictionary`2.

Methods

Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue) Add(TKey, TValue)

Adds an element with the provided key and value to the System.Collections.Generic.IDictionary`2.

Clear() Clear() Clear() Clear() Clear()

Removes all related application settings.

ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey) ContainsKey(TKey)

Determines whether the System.Collections.Generic.IDictionary`2 contains an element with the specified key.

First() First() First() First() First()

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

GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

Returns an enumerator that iterates through the collection.

GetView() GetView() GetView() GetView() GetView()

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

HasKey(String) HasKey(String) HasKey(String) HasKey(String) HasKey(String)

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

Insert(String, Object) Insert(String, Object) Insert(String, Object) Insert(String, Object) Insert(String, Object)

Inserts or replaces an application setting.

Lookup(String) Lookup(String) Lookup(String) Lookup(String) Lookup(String)

Retrieves the specified application setting.

Remove(T) Remove(T) Remove(T) Remove(T) Remove(T)

Removes the element with the specified key from the System.Collections.Generic.IDictionary`2.

Remove(String) Remove(String) Remove(String) Remove(String) Remove(String)

Removes the specified application setting.

TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue) TryGetValue(TKey, out TValue)

Gets the value associated with the specified key.

Events

MapChanged MapChanged MapChanged MapChanged MapChanged

Occurs when the map changes.

See Also