Change Media Element Video Area

Apr 24, 2011 at 6:40 AM

Is it possible to change the background of video area. Currently it is black. Samples help you changing other parts of player, but I cant find anything to change the black background around media element. I would appreciate any help.

Below is the control that host media element. I have applied a whole bunch of styles but none seems to work. Looks like may be things are hard coded for these in the player?

<ContentControl x:Name="MediaPresenterElement" Padding="50" BorderBrush="Red" BorderThickness="4" Margin="50" HorizontalContentAlignment="Stretch" Height="{TemplateBinding VideoHeight}" IsHitTestVisible="True" Grid.Row="0" VerticalContentAlignment="Stretch" Width="{TemplateBinding VideoWidth}" Background="Azure" Foreground="AliceBlue"/>

May 16, 2011 at 3:55 PM

It's possible, but you need a workaround to override the default behavior where the Background of the dynamically loaded media element is set to transparent.

Read how to do that in my blogpost: