Share via


MediaCollection.AddItem Method

Adds a media item to the current media collection.

Overload List

  public void AddItem(
  object  media
);
public void AddItem(
  object  media,
  int  index
);
public void AddItem(
  object  media,
  int  index,
  int  playbackFlags
);
public void AddItem(
  object  media,
  int  index,
  int  playbackFlags,
  object  tag
);
public void AddItem(
  object  media,
  int  index,
  int  playbackFlags,
  object  tag,
  System.Collections.IDictionary  friendlyData
);
public void AddItem(
  object  media,
  int  index,
  int  playbackFlags,
  object  tag,
  System.Collections.IDictionary  friendlyData,
  TimeSpan  start,
  TimeSpan  end
);

Parameters

media

System.Object.  Contains the URI to the media item.

index

System.Int32.  A value that indicates the index location within the collection. Specify an index value to insert an item at that point and to push existing items down the list.

playbackFlags

System.Int32.  A bitflag value that indicates which members of the MediaItemPlaybackCapabilities enumeration are enabled, indicating the playback capabilities of the media item.

tag

System.Object.  An application-specific object that can be associated with the media item.

friendlyData

System.Collections.IDictionary.  A collection of name-value pairs that override the metadata included in the media item (title, date, and duration).

start

System.TimeSpan.  The time offset from which to start playing the media item.

end

System.TimeSpan.  The time offset at which to stop playing the media item.

Return Value

This method does not return a value.

Remarks

If an index is not specified, the item is appended to the end of the list.

Requirements

Reference: Microsoft.MediaCenter

Namespace: Microsoft.MediaCenter

Assembly: Microsoft.MediaCenter.dll

Platform: Windows 7

See Also