title: WPF auto resize elements
body: <p>When application window is resized I want that the elements in it would resize proportionally too.
  Is that possible? I tried googling but couldn't really find anyting related to this.
  My XAML code:</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>&lt;Window x:Class="app.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" Height="350" Width="525" KeyDown="Window_KeyDown"&gt;
      &lt;Grid&gt;
          &lt;TabControl Name="MyTabControl"&gt;
              &lt;TabItem Name="pradzia" Header="Pradžia" IsSelected="True"&gt;
                  &lt;Button Content="Pradžia" Height="55" Name="button1" Width="125" Click="button1_Click" /&gt;
              &lt;/TabItem&gt;
              &lt;TabItem Header="Vykdyti" Name="vykdyti" IsEnabled="False"&gt;
                      &lt;Grid Button.Click="Grid_Click"&gt;
                      &lt;Button Content="1" Height="50" HorizontalAlignment="Left" Margin="6,0,0,6" Name="button2" VerticalAlignment="Bottom" Width="125" FontSize="20" /&gt;
                          &lt;Button Content="2" Height="50" HorizontalAlignment="Center" Name="button3" VerticalAlignment="Bottom" Width="125" FontSize="20" Margin="184,0,184,6" /&gt;
                      &lt;Button Content="3" Height="50" HorizontalAlignment="Right" Margin="362,0,0,6" Name="button4" VerticalAlignment="Bottom" Width="125" FontSize="20" /&gt;
                          &lt;TextBlock Height="23" HorizontalAlignment="Center" Name="textBlock1" Margin="0,15,0,0" Text="Kiek gyvūnų paveiksliuke?" VerticalAlignment="Top" FontSize="16" /&gt;
                      &lt;Image Height="150" HorizontalAlignment="Center" Margin="0,-25,0,0" Name="mainImage" Stretch="Uniform" VerticalAlignment="Center" Width="200" /&gt;
                  &lt;/Grid&gt;
              &lt;/TabItem&gt;
          &lt;/TabControl&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>