RetailInfo.Properties Property
Definition
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.
Gets an object that represents the set of available retail demo properties and their values.
public:
static property IMapView<Platform::String ^, Platform::Object ^> ^ Properties { IMapView<Platform::String ^, Platform::Object ^> ^ get(); };
static IMapView<winrt::hstring, IInspectable const&> Properties();
public static IReadOnlyDictionary<string,object> Properties { get; }
var iMapView = RetailInfo.properties;
Public Shared ReadOnly Property Properties As IReadOnlyDictionary(Of String, Object)
Property Value
A read-only collection of key-value pairs, each pair representing an available retail demo property. This is an instance of a collection interface, not a strongly typed collection, so use the interface APIs to work with the items.
Remarks
These properties include specific information that is useful for apps that are running or otherwise available as pre-installed demo apps in a retail setting. For example, you can get a ManufacturerName, ScreenSize, and so on.
If IsDemoModeEnabled is false, Properties might contain a zero-length collection or null. Verify that IsDemoModeEnabled is true before getting the Properties value.
Once you have a valid collection, this collection is a map/dictionary where each property is identified by a property name. These property names are predefined, and each known property name is represented by a static string property of the KnownRetailInfoProperties class. So whenever you attempt to get a specific property, use a KnownRetailInfoProperties property to supply the string key value, rather than hard-coded strings. That will assure you aren't asking for values that don't exist in the collection.
The collection is represented by a different interface/object depending on which programming language you are using.
- If you're using .NET code, the collection is an IReadOnlyDictionary instance, with string keys and nominally untyped (Object) values. Use the Item indexer or TryGetValue to get the values of specific properties. Always use KnownRetailInfoProperties properties to specify the key parameters.
- If you're using C++/CX, the collection is an IMapView(String, Object) instance, which can be used as Platform::Collections::MapView. It has string keys and nominally untyped (Platform::Object) values. Use Lookup to get the values of specific properties. Always use KnownRetailInfoProperties properties to specify the key parameters.
- If you're using JavaScript, the object represents IMapView API with string keys and untyped values. Use Lookup to get the values of specific properties.
The values you get for the properties are technically untyped objects (variants) because they are being reported directly from registry info (HKLM). Here are the types that you can use as type-casting options (which might be needed for UI display) for each of the properties:
Property | Type |
---|---|
BatteryLifeDescription | String |
DisplayDescription | String |
DisplayModelName | String |
FormFactor | String |
FrontCameraDescription | String |
GraphicsDescription | String |
HasNfc | Boolean |
HasOpticalDrive | Boolean |
HasSdSlot | Boolean |
IsFeatured | Boolean |
IsOfficeInstalled | Boolean |
ManufacturerName | String |
Memory | String |
ModelName | String |
Price | Double |
ProcessorDescription | String |
RearCameraDescription | String |
RetailAccessCode | String |
ScreenSize | String |
StorageDescription | String |
Weight | String |
WindowsEdition | String |