MediaPropertySet MediaPropertySet MediaPropertySet MediaPropertySet Class

Represents a set of media properties.

Syntax

Declaration

public sealed class MediaPropertySetpublic sealed class MediaPropertySetPublic NotInheritable Class MediaPropertySet

Remarks

This object is not instantiated directly, it is returned by retrieving one of the following properties:

For information on working with a property set collection, see PropertySet.

Collection member lists

For JavaScript, MediaPropertySet supports using an index to access items.

Constructors summary

Creates an instance for MediaPropertySet.

Properties summary

Gets the number of items contained in the property set.

Methods summary

Removes all items from the property set.

Returns an iterator to enumerate the items in the property set.

Returns an immutable view of the property set.

Indicates whether the property set has an item with the specified key.

Adds an item to the property set.

Retrieves the value for the specified key.

Removes an item from the property set.

Constructors

  • MediaPropertySet()
    MediaPropertySet()
    MediaPropertySet()
    MediaPropertySet()

    Creates an instance for MediaPropertySet.

    public MediaPropertySet()public MediaPropertySet()Public Function MediaPropertySet() As

Properties

  • Size
    Size
    Size
    Size

    Gets the number of items contained in the property set.

    public uint Size { get; }public uint Size { get; }Public ReadOnly Property Size As uint

    Property Value

    • uint
      uint
      uint
      uint

      The number of items in the property set.

Methods

  • Clear()
    Clear()
    Clear()
    Clear()

    Removes all items from the property set.

    public void Clear()public void Clear()Public Function Clear() As void
  • First()
    First()
    First()
    First()

    Returns an iterator to enumerate the items in the property set.

    public IIterator<Guid, object>> First()public IIterator<Guid, object>> First()Public Function First() As IIterator( Of Guid, object )

    Returns

    • The iterator. The current position of the iterator is index 0, or the end of the property set if the property set is empty.

  • GetView()
    GetView()
    GetView()
    GetView()

    Returns an immutable view of the property set.

    public IMapView<Guid, object> GetView()public IMapView<Guid, object> GetView()Public Function GetView() As IMapView( Of Guid, object )

    Returns

    • The immutable view.

  • HasKey(System.Guid)
    HasKey(System.Guid)
    HasKey(System.Guid)
    HasKey(System.Guid)

    Indicates whether the property set has an item with the specified key.

    public bool HasKey(System.Guid)public bool HasKey(System.Guid)Public Function HasKey(System.Guid) As bool

    Parameters

    • key
      System.Guid
      System.Guid
      System.Guid
      System.Guid

      The key.

    Returns

    • bool
      bool
      bool
      bool

      True if the property set has an item with the specified key; otherwise, false.

  • Insert(System.Guid,System.Object)
    Insert(System.Guid,System.Object)
    Insert(System.Guid,System.Object)
    Insert(System.Guid,System.Object)

    Adds an item to the property set.

    public bool Insert(System.Guid,System.Object)public bool Insert(System.Guid,System.Object)Public Function Insert(System.Guid,System.Object) As bool

    Parameters

    • key
      System.Guid
      System.Guid
      System.Guid
      System.Guid

      The key of the item to insert.

    • value
      System.Object
      System.Object
      System.Object
      System.Object

      The value of the item to insert.

    Returns

    • bool
      bool
      bool
      bool

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

  • Lookup(System.Guid)
    Lookup(System.Guid)
    Lookup(System.Guid)
    Lookup(System.Guid)

    Retrieves the value for the specified key.

    public object Lookup(System.Guid)public object Lookup(System.Guid)Public Function Lookup(System.Guid) As object

    Parameters

    • key
      System.Guid
      System.Guid
      System.Guid
      System.Guid

      The key.

    Returns

    • object
      object
      object
      object

      The value, if an item with the specified key exists. Use the HasKey method to determine whether the key exists.

  • Remove(System.Guid)
    Remove(System.Guid)
    Remove(System.Guid)
    Remove(System.Guid)

    Removes an item from the property set.

    public void Remove(System.Guid)public void Remove(System.Guid)Public Function Remove(System.Guid) As void

    Parameters

    • key
      System.Guid
      System.Guid
      System.Guid
      System.Guid

      The key of the item to remove.

    Remarks

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

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.HasVariantAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Media.MediaProperties.dll