title: How to make all controls resize accordingly proportionally when window is maximized?
body: <p>When I clicked on the maximize button the window is maximized but the controls are not resized proportionally. What is the best way to make the controls resize accordingly? I am using MVVM.</p>
  
  <p>Here is my code.</p>
  
  <pre><code>&lt;Window x:Class="DataTransfer.View.Window1"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Icon="/DataTransfer;component/View/Images/ms_msnexplore.gif"
  
          ResizeMode="CanResizeWithGrip"
          Title="Window1" Height="500" Width="600"&gt;
      &lt;!--Style="{DynamicResource OfficeStyle}"--&gt;
      &lt;Window.Resources&gt;
          &lt;ResourceDictionary&gt;
              &lt;ResourceDictionary.MergedDictionaries&gt;
                  &lt;!--&lt;ResourceDictionary Source="/DataTransfer;component/View/WindowBase.xaml" /&gt;--&gt;
                  &lt;!--&lt;ResourceDictionary Source="/DataTransfer;component/Themes/WPFThemes/CalendarResource.xaml" /&gt;--&gt;
              &lt;/ResourceDictionary.MergedDictionaries&gt;
          &lt;/ResourceDictionary&gt;
      &lt;/Window.Resources&gt;
  
      &lt;Grid&gt;
      &lt;Grid.RowDefinitions&gt;
          &lt;RowDefinition Height="*" /&gt;
      &lt;/Grid.RowDefinitions&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width ="*" /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
          &lt;Button Content="Button" HorizontalAlignment="Left" Margin="52,28,0,0" VerticalAlignment="Top" Width="75" Height="22" /&gt;
          &lt;DatePicker Name="dp" HorizontalAlignment="Left" Margin="175,25,0,0" VerticalAlignment="Top" Width="123" Text="aaa" GotFocus="DateGotFocused" LostFocus="OnLeaveArchiveDate"/&gt;
          &lt;Calendar HorizontalAlignment="Left" Margin="47,162,0,0" VerticalAlignment="Top"/&gt;
          &lt;TextBox Name="t1" HorizontalAlignment="Left" Height="23" Margin="337,23,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="120" LostFocus="LeaveField" /&gt;
          &lt;RadioButton Content="RadioButton" HorizontalAlignment="Left" Margin="88,92,0,0" VerticalAlignment="Top"/&gt;
          &lt;CheckBox Content="CheckBox" HorizontalAlignment="Left" Margin="252,96,0,0" VerticalAlignment="Top"/&gt;
          &lt;ComboBox Name="combo" IsEditable="False" Text="aaa" IsReadOnly="True"
                    HorizontalAlignment="Left" Margin="337,89,0,0" VerticalAlignment="Top" Width="120" 
                    Focusable="True" GotFocus="ComboBoxGotFocused" &gt;
              &lt;ComboBoxItem&gt;January&lt;/ComboBoxItem&gt;
              &lt;ComboBoxItem&gt;February&lt;/ComboBoxItem&gt;
          &lt;/ComboBox&gt;
          &lt;TextBlock HorizontalAlignment="Left" Height="40" Margin="260,184,0,0" TextWrapping="Wrap" Text="Text_Block" VerticalAlignment="Top" Width="257"/&gt;
  
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>