Video reflection : Video « UI Controls « Silverlight






Video reflection

   
<UserControl x:Class='SilverlightApplication3.MainPage'
    xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' 
    xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
    xmlns:d='http://schemas.microsoft.com/expression/blend/2008' 
    xmlns:mc='http://schemas.openxmlformats.org/markup-compatibility/2006' 
    mc:Ignorable='d' 
    d:DesignWidth='640' 
    d:DesignHeight='480'>
  <Grid Margin="15" HorizontalAlignment="Center">
    <Grid.RowDefinitions>
      <RowDefinition></RowDefinition>
      <RowDefinition></RowDefinition>
    </Grid.RowDefinitions>
      
      <MediaElement x:Name="media" Source="test.wmv"
     Stretch="Uniform"></MediaElement>
    

    
      <Rectangle Grid.Row="1" Stretch="Uniform">
        <Rectangle.Fill>
          <VideoBrush SourceName="media">
            <VideoBrush.RelativeTransform>
              <ScaleTransform ScaleY="-1" CenterY="0.5"></ScaleTransform>
            </VideoBrush.RelativeTransform>
          </VideoBrush>
        </Rectangle.Fill>

        <Rectangle.OpacityMask>
          <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
            <GradientStop Color="Black" Offset="0"></GradientStop>
            <GradientStop Color="Transparent" Offset="0.6"></GradientStop>
          </LinearGradientBrush>
        </Rectangle.OpacityMask>
      </Rectangle>
    
  </Grid>

</UserControl>

   
    
    
  








Related examples in the same category

1.Playing VideoPlaying Video
2.Video Brush
3.Video markerVideo marker