Last Updated on Sunday, 2 September 2012 02:16 Written by Andrew Ivanov Friday, 7 September 2012 12:00
A VideoBrush paints an area with video. This topic describes how to use the Silverlight VideoBrush to paint shapes and text with video. It also provides examples that show how to interactively control a VideoBrush.
A VideoBrush is a type of Brush object similar to a LinearGradientBrush or an ImageBrush. However, instead of painting an area with a gradient or an image, it paints an area with video content. This video content is provided by a MediaElement. As with other brush types, you can use a VideoBrush to paint the Fill of a Rectangle, the Background of a Canvas, or the Foreground of a TextBlock. For more information about VideoBrush, see msdn.
To paint an area with video, you create a MediaElement and a VideoBrush and apply that VideoBrush to the object that you want to paint (see the following example).