Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DataPackagePropertySet.Insert | insert method

Adds a property to the DataPackagePropertySet object.

Syntax


var boolean = dataPackagePropertySet.insert(key, value);

Parameters

key

Type: String [JavaScript] | Platform::String [C++]

The key to insert.

value

Type: Object [JavaScript] | Platform::Object [C++]

The value to insert.

Return value

Type: Boolean [JavaScript] | Platform::Boolean [C++]

True if the method replaced a value that already existed for the key; false if this is a new key.

Remarks

Use this method if your app needs to add a custom property to the DataPackagePropertySet object. A custom property is any property that you can't define by using an existing property of the object. For example, title is a property that the object supports directly, but if you wanted a subtitle property, you would need to use Insert to add it.

For more info, see IMapView(String, Object).

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel.DataTransfer
Windows::ApplicationModel::DataTransfer [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.ApplicationModel.DataTransfer
Windows::ApplicationModel::DataTransfer [C++]

Metadata

Windows.winmd

See also

DataPackagePropertySet

 

 

Show: