Media Player Control stretch to fit window size
I have the following code to load media and display it using Media Player
Control:
MediaPlayer Player = new MediaPlayer();
Player.Open(new Uri(videoURI, UriKind.Absolute));
VideoDrawing aVideoDrawing = new VideoDrawing();
aVideoDrawing.Rect = new Rect(0, 0, 100, 100);
aVideoDrawing.Player = Player;
DrawingBrush brush = new DrawingBrush(aVideoDrawing);
this.Background = brush;
No matter what is the size of the movie I play, it stretches to 1920x1080
(the window size).
I want it to be in the original full size and if the height/width is less
then 1920/1080 it will center the video.
Since there's no physical control, I have no Idea how to do it...
Will appreciate your help.
No comments:
Post a Comment