VisualBrush Binding to a Button
<Window x:Class="Drawing.VisualBrush" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="VisualBrush" Height="300" Width="300" > <StackPanel Margin="3"> <Button Name="cmd" Margin="3" Padding="5">Is this a real button?</Button> <Rectangle Margin="3" Height="{Binding ElementName=cmd,Path=ActualHeight}"> <Rectangle.Fill> <VisualBrush Visual="{Binding ElementName=cmd}"></VisualBrush> </Rectangle.Fill> </Rectangle> <Rectangle Margin="3" Height="50"> <Rectangle.Fill> <VisualBrush Visual="{Binding ElementName=cmd}"></VisualBrush> </Rectangle.Fill> </Rectangle> <Rectangle Margin="3" Height="150"> <Rectangle.Fill> <VisualBrush Visual="{Binding ElementName=cmd}"></VisualBrush> </Rectangle.Fill> </Rectangle> </StackPanel> </Window>
1. | Tiled VisualBrush | ||
2. | VisualBrush and DrawingBrush | ||
3. | Simulating a reflection with VisualBrush | ||
4. | Visual Brush For a Rectangle | ||
5. | Use VisualBrush to paint background | ||
6. | Tile VisualBrush |