ApplicationDataContainerSettings Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- 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
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
To get an app's local settings, do the following things. These steps are demonstrated in the LocalSettings example.
- Get the value of the static ApplicationData.Current property. This property returns a data store of type ApplicationData.
- Get the value of the data store's LocalSettings property. This property returns a data container of type ApplicationDataContainer.
- 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.
Note that for JavaScript, ApplicationDataContainerSettings supports using an index to access items.
Size |
Gets the number of related application settings. |
Clear() |
Removes all related application settings. |
First() |
Retrieves an iterator to enumerate the settings in the settings container. |
Get |
Returns a read-only snapshot of the contents of the settings container. |
Has |
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. |
Map |
Occurs when the map changes. |