Rossj wrote:

Haven't used MediaPlayer and VideoDrawing, but do you not need to add the VideoDrawing to something, or tell it where to paint?


Rossj is on the right track, this question was asked in the forums.
It ain't easy, basicly you need a rectangle in your xaml, and then refer to that rectangle in code. Notice the Click on the button is set to the Name of the playMedia event.

XAML:

<StackPanel>
  <
Rectangle x:Name="VideoRect" Height="220"
     RadiusX
="10" RadiusY="10"/>
 
<Button Click="playMedia" VerticalAlignment="Bottom"
     Content
="Play" Height="25"/>
</StackPanel>

Code:
public void playMedia(object sender, RoutedEventArgs e) {

   MediaPlayer player = new MediaPlayer();
   player.Open( new Uri( @"Movie.wmv", UriKind.Relative ) );

   VideoDrawing aVideoDrawing = new VideoDrawing();
   aVideoDrawing.Player = player;
   aVideoDrawing.Rect = new Rect( 0, 0, 222, 222 );
   // Needs a Rect associated With the VideoDrawing but size is
   // Determinted by the xaml Code.
   DrawingBrush dBrush = new DrawingBrush( aVideoDrawing );
   VideoRect.Fill = dBrush;

   // Play the video once.
   player.Play();
}