<Window x:Class="BitmapCache.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Different BitmapCache.RenderAtScale Values" Height="350" Width="525">
    <Window.CacheMode>
        <BitmapCache RenderAtScale="1"/>
    </Window.CacheMode>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Button Margin="10 10 0 0">
            <Button.CacheMode>
                <BitmapCache RenderAtScale="1"/>
            </Button.CacheMode>
            <Viewbox>                
            <Canvas Height="305" Width="260">
                <Path Fill="Blue" Data="M 240,250
    C 200,375 200,250 175,200
    C 100,400 100,250 100,200
    C 0,350   0,250   30,130
    C 75,0    100,0   150,0
    C 200,0   250,0   250,150 Z"/>
                <Ellipse Fill="Black" Stroke="White" StrokeThickness="10"
    Width="40" Height="40" Canvas.Left="75" Canvas.Top="75"/>
                <Ellipse Fill="Black" Stroke="White" StrokeThickness="10"
    Width="40" Height="40" Canvas.Left="150" Canvas.Top="85"/>
                <Line X1="75" Y1="160" X2="175" Y2="150" StrokeStartLineCap="Round"
    StrokeEndLineCap="Round" Stroke="Black" StrokeThickness="10"/>
            </Canvas>
            </Viewbox>
        </Button>
        <Button Margin="10 10 10 0" Grid.Column="1">
            <Button.CacheMode>
                <BitmapCache RenderAtScale=".5"/>
            </Button.CacheMode>
            <Viewbox>
                <Canvas Height="305" Width="260">
                    <Path Fill="Blue" Data="M 240,250
    C 200,375 200,250 175,200
    C 100,400 100,250 100,200
    C 0,350   0,250   30,130
    C 75,0    100,0   150,0
    C 200,0   250,0   250,150 Z"/>
                    <Ellipse Fill="Black" Stroke="White" StrokeThickness="10"
    Width="40" Height="40" Canvas.Left="75" Canvas.Top="75"/>
                    <Ellipse Fill="Black" Stroke="White" StrokeThickness="10"
    Width="40" Height="40" Canvas.Left="150" Canvas.Top="85"/>
                    <Line X1="75" Y1="160" X2="175" Y2="150" StrokeStartLineCap="Round"
    StrokeEndLineCap="Round" Stroke="Black" StrokeThickness="10"/>
                </Canvas>
            </Viewbox>
        </Button>
        <Button Margin="10 10 0 10" Grid.Row="1">
            <Button.CacheMode>
                <BitmapCache RenderAtScale=".1"/>
            </Button.CacheMode>
            <Viewbox>
                <Canvas Height="305" Width="260">
                    <Path Fill="Blue" Data="M 240,250
    C 200,375 200,250 175,200
    C 100,400 100,250 100,200
    C 0,350   0,250   30,130
    C 75,0    100,0   150,0
    C 200,0   250,0   250,150 Z"/>
                    <Ellipse Fill="Black" Stroke="White" StrokeThickness="10"
    Width="40" Height="40" Canvas.Left="75" Canvas.Top="75"/>
                    <Ellipse Fill="Black" Stroke="White" StrokeThickness="10"
    Width="40" Height="40" Canvas.Left="150" Canvas.Top="85"/>
                    <Line X1="75" Y1="160" X2="175" Y2="150" StrokeStartLineCap="Round"
    StrokeEndLineCap="Round" Stroke="Black" StrokeThickness="10"/>
                </Canvas>
            </Viewbox>
        </Button>
        <Button Margin="10" Grid.Row="1" Grid.Column="1">
            <Button.CacheMode>
                <BitmapCache RenderAtScale=".01"/>
            </Button.CacheMode>
            <Viewbox>
                <Canvas Height="305" Width="260">
                    <Path Fill="Blue" Data="M 240,250
    C 200,375 200,250 175,200
    C 100,400 100,250 100,200
    C 0,350   0,250   30,130
    C 75,0    100,0   150,0
    C 200,0   250,0   250,150 Z"/>
                    <Ellipse Fill="Black" Stroke="White" StrokeThickness="10"
    Width="40" Height="40" Canvas.Left="75" Canvas.Top="75"/>
                    <Ellipse Fill="Black" Stroke="White" StrokeThickness="10"
    Width="40" Height="40" Canvas.Left="150" Canvas.Top="85"/>
                    <Line X1="75" Y1="160" X2="175" Y2="150" StrokeStartLineCap="Round"
    StrokeEndLineCap="Round" Stroke="Black" StrokeThickness="10"/>
                </Canvas>
            </Viewbox>
        </Button>
    </Grid>
</Window>
