Getting Started

This article will show you how to create a simple MediaPlayer.

In order to use RadMediaPlayer in your projects you have to add references to the following assemblies:

  • Telerik.Windows.Controls
  • Telerik.Windows.Controls.MediaPlayer

You can find more info here.

  1. Drag and Drop the MediaPlayer control from the toolbox.

    Silverlight RadMediaPlayer Drag and Drop from ToolBox

  2. After you have dropped the control onto the design surface, you can modify it by setting various properties:

        xmlns:telerik=http://schemas.telerik.com/2008/xaml/presentation 
        ... 
        <telerik:RadMediaPlayer IsAutoPlaylistAdvance="True" MinWidth="200" SelectedIndex="0"> 
        </telerik:RadMediaPlayer> 
    

    The RadMediaPlayer is a wrapper around the Silverlight's MediaElement control. This is why it only supports the media formats that the Silverlight's MediaElement does. The full list of supported media formats can be found here.

The RadMediaPlayer control can be populated with items of type RadMediaItem. Each media item represents a resource (file or stream) that can be played by the RadMediaPlayer control. Below is an example demonstrating how to declaratively add an item in XAML:

<telerik:RadMediaPlayer Width="600" Height="400" Margin="20"> 
    <telerik:RadMediaItem  
        Source="http://mschnlnine.vo.llnwd.net/d1/ch9/7/1/5/1/2/4/DynamicsDuoCRMSilverlight_ch9.wmv" 
        Header="The Dynamics Duo talk about CRM and Silverlight" /> 
</telerik:RadMediaPlayer> 
In this article