<UserControl
    x:Class="Layout.Examples.ViewBoxExample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Layout.Examples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="400"
    d:DesignWidth="400">    
    
    <Viewbox Width="400" Height="400" Grid.Row="1" Stretch="Fill">
        <Grid Width="500" Height="500" Background="White">
            <Grid.RowDefinitions>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <Rectangle Fill="Red" Width="250" Height="125"/>
            <Rectangle Fill="Green" Width="150" Height="75" Grid.Row="1"/>
            <Ellipse Fill="Blue" Width="250" Height="250" Grid.Column="1"/>
        </Grid>
    </Viewbox>    
</UserControl>
