Mega Code Archive

 
Categories / Silverlight / Graphics
 

Adding a VideoBrush

<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'> <MediaElement x:Name="movie"               Source ="video.wmv"               Opacity="0"/> <Path Data="M210,210 C135,399 16,193 148,62 C100,150 200,80       210,210"       Stroke="Black">     <Path.Fill>         <VideoBrush SourceName="movie"                     Stretch="UniformToFill"/>     </Path.Fill> </Path> </UserControl>