The ekleeman.com Silverlight 2 MediaPlayerCS is a fully functional media player written entirely in the CLR. MediaPlayerCS can be dropped onto the Expression Blend 2 design surface or instantiated programatically. MediaPlayerCS currently supports 4 embedded skins borrowed from Expression Encoder and the Microsoft Silverlight Media Player Server Control. Bear in mind MediaPlayerCS is not a .NET server control. It is a Silverlight control for use in Silverlight applications that does not require .js files or additional XAML. MediaPlayerCS also supports custom skins. For more information See Applying Custom Skins to MediaPlayerCS.
To Begin we should note the four supported skins:
Expression (the default skin)
QuickSilver
Professional
Audiogray
After you download the latest build here. Add ekleeman.silverlight.controls.dll to your Silverlight project. Then you will need to add a namespace reference to the page.xaml markup.
xmlns:eksc="clr-namespace:ekleeman.silverlight.controls;assembly=ekleeman.silverlight.controls"
Then you can add the MediaPlayerCS control like so.
You can add width and height to the control at design time by using ScaleWidth and ScaleHeight to assist with your application layout. The designer will always show the Expression skin at design time.
<eksc:MediaPlayerCS x:Name="MyMediaPlayer" ScaleHeight="300" ScaleWidth="400" > </eksc:MediaPlayerCS>
Then in the code behind you can modify the control's properties to show the skin you want and the media file to play.
For a complete listing of MediaPlayerCS properties please go here.
To see the MediaPlayerCS in action please visit ekleeman.com and expand the Beatles or Jimi Hendrix Content Shuffle Panels. The implementation hooks into the Play and Stop button events to position and resize MediaPlayerCS for a dynamic video layout.