<Window x:Class="_12_形状画刷和变换_14VisualBrush.MainWindow"
        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"
        Icon="public/003540AH4M72.jpg" Title="12-形状画刷和变换-14VisualBrush" Height="450" Width="800">
    <StackPanel>
        <Button Name="ButtonCmd" Margin="3" Padding="15 5" BorderBrush="Aqua">复制按钮外观</Button>

        <Rectangle Margin="3" Height="100">
            <Rectangle.Fill>
                <VisualBrush Visual="{Binding ElementName=ButtonCmd}" />
            </Rectangle.Fill>
        </Rectangle>
    </StackPanel>
</Window>