<UserControl
    x:Class="Panels.ViewboxExample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Panels"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <Grid HorizontalAlignment="Right" VerticalAlignment="Top"
        Margin="10" Width="400">
        <Grid.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="Text" Value="Viewbox"/>
                <Setter Property="FontSize" Value="72"/>
                <Setter Property="FontWeight" Value="Bold"/>
            </Style>
            <Style TargetType="Viewbox">
                <Setter Property="Height" Value="50"/>
                <Setter Property="Margin" Value="5"/>
            </Style>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="100"/>
        </Grid.ColumnDefinitions>
        <Viewbox Stretch="None">
            <TextBlock/>
        </Viewbox>
        <Viewbox Stretch="Fill" Grid.Column="1">
            <TextBlock/>
        </Viewbox>
        <Viewbox Stretch="Uniform" Grid.Column="2">
            <TextBlock/>
        </Viewbox>
        <Viewbox Stretch="UniformToFill" Grid.Column="3">
            <TextBlock/>
        </Viewbox>
    </Grid>

</UserControl>
