The VideoWidth and VideoHeight properties allow you to manipulate the size of the
MediaElement inside RadMediaPlayer. By default, the two properties have a value
of Double.NaN which means that the MediaElement will take up as much space as the control
has reserved for it.
One additional property that allows you to tweak the MediaElement is the VideoStretch
property, which allows you to manipulate MediaElement'sStretch property.
Below you can see examples of some common scenarios using the VideoWidth,
VideoHeight and VideoStretch properties.
CopyXAML - default video size
<telerik:RadMediaPlayer Width="400" Height="300">
<telerik:RadMediaItem Header="C# 4.0: Meet the Design Team" Source="http://mschnlnine.vo.llnwd.net/d1/ch9/4/6/3/9/0/4/CSharp4DesignTeam_ch9.wmv" />
</telerik:RadMediaPlayer>
CopyXAML - The video is stretched to fill the RadMediaPlayer control
<telerik:RadMediaPlayer Width="400" Height="300">
<telerik:RadMediaItem Header="C# 4.0: Meet the Design Team"
Source="http://mschnlnine.vo.llnwd.net/d1/ch9/4/6/3/9/0/4/CSharp4DesignTeam_ch9.wmv"
VideoStretch="Fill" />
</telerik:RadMediaPlayer>In the next example, RadMediaPlayer's Width and Height
are not set. The only hard-coded size is that of the media element. In this scenario, RadMediaPlayer
will be sized accordingly to the MediaElement's size.
CopyXAML
<telerik:RadMediaPlayer>
<telerik:RadMediaItem Title="C# 4.0: Meet the Design Team"
Source="http://mschnlnine.vo.llnwd.net/d1/ch9/4/6/3/9/0/4/CSharp4DesignTeam_ch9.wmv"
VideoHeight="250"
VideoStretch="Fill"
VideoWidth="500" />
</telerik:RadMediaPlayer>