title: How to resize C# WPF Program to fit any screen resolution
body: <p>I am trying to figure out how to resize my C# WPF Program to essentially fit any screen resolution. I am trying to fit my program to a computer with a screen resolution of <em>1280 x 1024</em>. I can't find any information on how to do this exactly, of course I could rig the dimensions of the program to fit the specific screen but every computers screen resolution could be potentially different right? I tried using the obvious solution that was provided here: <a href="https://stackoverflow.com/questions/8121906/resize-wpf-window-and-contents-depening-on-screen-resolution">Resize WPF Window and contents depening on screen resolution</a> but it did not help at all. </p>
  
  <p>i.e. I used: (Also, I wasn't sure if I needed to set the <code>HorizontalAlignment</code> &amp; <code>VerticalAlignment</code> to "stretch" as well, but I did anyway.)</p>
  
  <pre><code>Title="my screen" Height="{Binding SystemParameters.PrimaryScreenHeight}" Width="{Binding SystemParameters.PrimaryScreenWidth}" WindowStartupLocation="CenterScreen" WindowState="Maximized"&gt;
      &lt;Grid Name="myGrid" Background="LightGray" Margin="0,0,2,-30" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"&gt;
          &lt;TextBox Name="stuffTB" HorizontalAlignment="Left" Height="28" Margin="751,252,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="186" /&gt;
  </code></pre>
  
  <p>...</p>
  
  <p>Whenever I run my <strong>exe</strong> on the computer with the dimensions of <em>1280 x 1024</em> it cuts off contents that are in my grid. Any advice or help would be great, even links to examples would be awesome. Thanks in advance.</p>