Replace the below given code with <grid></grid> tag given in your Application
1. Page or Window Tag is depend upon the type of Application you are using
<Page.Background>
<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
<GradientStop Color="Black" Offset="0" />
<GradientStop Color="#AFFFFFB1" Offset="0.099" />
</LinearGradientBrush>
</Page.Background>
<DockPanel>
<Border Background="{Binding ElementName=color,Path=SelectedItem.Content}" BorderThickness="5" CornerRadius="8" Height="468" Width="466">
<StackPanel Height="410" Width="448">
<StackPanel.Effect>
<DropShadowEffect Color="CadetBlue" BlurRadius="3" ShadowDepth="15" ></DropShadowEffect>
</StackPanel.Effect>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="18" Background="Black" Foreground="orange" Height="29" Width="246">here is the demo of video clip</TextBlock>
<!--<Expander FontSize="18" Header="expand me to show the video of jab tk h jaan ">-->
<ComboBox Name="sl" SelectedIndex="0">
<ComboBoxItem>D:\ashy\WpfApplication1\songsVideo\jbtkhjaan.mp4</ComboBoxItem>
<ComboBoxItem>D:\ashy\WpfApplication1\songsVideo\LaptopErgonomics.mp4</ComboBoxItem>
</ComboBox>
<MediaElement Volume="80" Opacity="80" Source="{Binding ElementName=sl,Path=SelectedItem.Content}"></MediaElement>
</StackPanel>
</Border>
<DockPanel.Background>
<RadialGradientBrush>
<GradientStop Color="#FF293955" Offset="0" />
<GradientStop Color="WhiteSmoke" Offset="0.574" />
</RadialGradientBrush>
</DockPanel.Background>
</DockPanel>
NOTE:
________________________________________________________________
- <Border> tag is optional ,it is just used to apply border on Page .
- <StackPanel.Effect> tag is optional , it is just used to apply some Effects on stack Panel
- The Source property specifies name of the media file to be played and it tag takes the full path of the video file.
- Let us see how to bind source attribute with the ComboBox's Element.
Source="{Binding ElementName=sl,Path=SelectedItem.Content}
where s1 is the name of ComboBox
- The RadialGradientBrush is similar in programming model to the LinearGradientBrush. However, the linear gradient has a start and an end point to define the gradient vector, while the radial gradient has a circle, along with a focal point, to define the gradient behavior. The circle defines the end point of the gradient. In other words, a gradient stop at 1.0 defines the color at the circle's circumference. The focal point defines the center of the gradient. A gradient stop at 0.0 defines the color at the focal point.