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.

MediaPropertySet.Remove | remove method

Applies to Windows and Windows Phone

Removes an item from the property set.

Syntax


mediaPropertySet.remove(key);

Parameters

key

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

The key of the item to remove.

Remarks

For the C# and Microsoft Visual Basic version of the Remove(Guid) method, see Remove.

Examples

The following example gets an instance of the MediaPropertySet class from the AudioEncodingProperties class and then removes an item from the property set. The example also shows how to use the other methods in the MediaPropertySet class.



function getPropertySet() { 
    var encodingProperties = new Windows.Media.MediaProperties.AudioEncodingProperties();
    var props = encodingProperties.properties;
    // Remove all items from the property set.
    props.clear();
    // Get an iterator for this property set. 
    var itertator = props.first();
    // Get the immutable view of the property set.
    var view = props.getView();   
    // Determine if the set has an item with the specified key.   
    if (props.hasKey(key)) {
        // Use the item.
    }
    // Add an item with the specified key and value to the property set.    
    if (props.insert(key, value)) {
        // Value was replaced.
    }
    else {
        // New key and value.
    }
    // Get the value for the specified key.
    var value = props.lookup(key);
    // Remove the item with the specified key from the property set.
    props.remove(key);
    // Get the number of items in the property set.
    var number = props.size;
}


Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Media.MediaProperties
Windows::Media::MediaProperties [C++]

Metadata

Windows.winmd

See also

MediaPropertySet

 

 

Show:
© 2014 Microsoft