« Microsoft Expression Web Designer CTP 1 Screenshots | Main | We need another image file format...? »

WPF Visual Brush with no code!

A little fun with the WPF VisualBrush element tonight:

In previous builds of WPF, it was always necessary to set the VisualBrush's Visual property in code. That's no longer necessary as this demo shows.

<VisualBrush x:Name="myVisualBrush" ViewboxUnits="Absolute"
Stretch="None" AlignmentX="Left" AlignmentY="Top"
Opacity="0.50" Visual="{Binding ElementName=BallArea}">

The complete code is here: Code

You should be able to paste this into a working March 2006 CTP build of WPF (XamlPad or XamlCruncher). Click the ball to see the dumb animation I added.

Help support my web site by searching and buying through Amazon.com (in assocation with Amazon.com).