I want to display a video as background of a grid. Based on this post I created this grid code:
<Grid>
<Grid.Background>
<VisualBrush>
<VisualBrush.Visual>
<StackPanel Background="White">
<Image Source="/WPF.Resources;component/Videos/background.wmv" Opacity="0.3"></Image>
</StackPanel>
</VisualBrush.Visual>
</VisualBrush>
</Grid.Background>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="491" />
<ColumnDefinition Width="491" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="250" />
<RowDefinition Height="250" />
<RowDefinition Height="105" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
</Grid>
However I am getting this error:
Blend does not support this file format. D:\WPF\Resources\Videos\background.wmv
What type of file WPF support as video background? I tried to play the video and I can play it so it is a valid file format.