You can now add media functionality to your Silverlight application by adding the MediaElement control to Page.xaml. For example, your Page.xaml contain code like this: <TextBlock Height="30" Width="120" x:Name="MediaStateText" /> <MediaElement x:Name="MediaPlayer" Source="mms://myserver/xbox.wmv" CurrentStateChanged="UpdateMediaState" Width="320" Height="240"/> Page.xaml.cs then need to implement a function called UpdateMediaState() that performs an action every time changes the current media playback state. The code might look MediaElement something like this: private void UpdateMediaState(object sender, RoutedEventArgs e) { MediaStateText.Text = MediaPlayer.CurrentState.ToString(); } For additional information on writing Silverlight applications with controls, please MediaElement consult the document. Client Migration Method 4 a Third-Party Player or Framework – Open Video Player Initiative Open Player is a community site dedicated to sharing best practices around video player development. You can player source code, reference for advertising technologies as well as get advice from a of designers, developers and content owners. Silverlight 2 Video Player on Codeplex There are many Silverlight 2 video players on CodePlex, including this one built by using the standard MediaElement and a few of the new system controls (ToggleButton, Slider and Button). The goal of the
You can now add media functionality to your Silverlight application by adding the MediaElement control to Page.xaml. For example, your Page.xaml contain code like this: <TextBlock Height="30" Width="120" x:Name="MediaStateText" /> <MediaElement x:Name="MediaPlayer" Source="mms://myserver/xbox.wmv" CurrentStateChanged="UpdateMediaState" Width="320" Height="240"/> Page.xaml.cs then need to implement a function called UpdateMediaState() that performs an action every time MediaElement changes the current media playback state. The code might look something like this: private void UpdateMediaState(object sender, RoutedEventArgs e) { MediaStateText.Text = MediaPlayer.CurrentState.ToString(); } For additional information on writing Silverlight applications with MediaElement controls, please consult the document. Client Migration Method 4 – a Third-Party Player or Framework Open Video Player Initiative Open Player is a community site dedicated to sharing best practices around video player development. You can player source code, reference for advertising technologies as well as get advice from a of designers, developers and content owners. Silverlight 2 Video Player on Codeplex There are many Silverlight 2 video players on CodePlex, including this one built by using the standard MediaElement and a few of the new system controls (ToggleButton, Slider and Button). The goal of the
Silverlight%20Migration%20Guide%20-%20February%202009.docx