MediaPlayer has no visual interface and not suitable to display videos.
It cannot be placed on the XAML designer.
It provides Media PlayBack for drawings.
We have to use VideoDrawing or DrawingContext classes for that.
MediaPlayer player = new MediaPlayer();
player.Open(new Uri("c:\\intro.wmv", UriKind.Relative));
VideoDrawing aVideoDrawing = new VideoDrawing();
aVideoDrawing.Rect = new Rect(0, 0, 100, 100);
aVideoDrawing.Player = player;
MediaElement has got visual interface and
can easily display videos using its built in properties.
It is designed for XAML use and can be placed on the XAML
Asked In: Many Interviews |