Paints an area with video content.
| XAML | <VideoBrush .../> |
| Scripting | To create an object using scripting, see the CreateFromXAML method. |
Properties
AlignmentX,
AlignmentY,
Name,
Opacity,
RelativeTransform,
SourceName,
Stretch,
Transform
Methods
Equals,
FindName,
GetHost,
GetValue,
SetValue
Examples
The following example uses a
VideoBrush to paint the Foreground of a
TextBlock.
| XAML |
<Canvas
xmlns="http://schemas.microsoft.com/client/2007"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<MediaElement
x:Name="butterflyMediaElement"
Source="sampleMedia/Butterfly.wmv" IsMuted="True"
Opacity="0.0" IsHitTestVisible="False" />
<TextBlock Canvas.Left="5" Canvas.Top="30"
FontFamily="Verdana" FontSize="120"
FontWeight="Bold" TextWrapping="Wrap"
Text="Video">
<!-- Paint the text with video. -->
<TextBlock.Foreground>
<VideoBrush SourceName="butterflyMediaElement" Stretch="UniformToFill" />
</TextBlock.Foreground>
</TextBlock>
</Canvas>
|
For more information, see the VideoBrush Overview.
See Also
VideoBrush Overview
Brush Overview
Silverlight Objects