c# - Enlarge video using WPF MediaElement -
hi trying expand mediaelement watch larger videos, problem can not in way, manually in designer , not work, try manually min-height , min-width property video remains same size.
by "expand" mean want video fill mediaelement
. right small.
source :
<window x:class="wpfapplication1.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" title="mainwindow" height="1028" width="525"> <grid> <mediaelement height="512" horizontalalignment="left" margin="12,12,0,0" name="player" verticalalignment="top" width="479" minheight="800" /> <button content="button" height="23" horizontalalignment="left" margin="157,566,0,0" name="button1" verticalalignment="top" width="75" click="button1_click" /> </grid> </window>
to content fill mediaelement
area, set stretch
property "fill":
<mediaelement stretch="fill" .../>
see msdn more information , other valid values of property.
Comments
Post a Comment