title: tips on developing resolution independent application
body: <p>Is it a good practice to find the workarea measurement and set some properties in code so that it could be bound to Control's margin or height/Width properties in xaml?</p>
  
  <p>I do this so that my window would resize according to the available workarea.</p>
  
  <pre><code>const int w = SystemParameters.WorkArea.Width;
  const int h = SystemParameters.WorkArea.Height;
  
  public Thickness OuterGridMargin { get; }
  
  MainViewModel()
  {
      OuterGridMargin = new Thickness(w/5,h/6,w/5,h/4);
  }
  </code></pre>
  
  <p>xaml:</p>
  
  <pre><code>&lt;Grid Margin="{Binding OuterGridMargin}" /&gt;
  </code></pre>
  
  <p>I do this for some outer containers so that the layout would not be messed in lower resolutions. Currently I work at 1600x900 res(96 dpi) in a 20". My application is gadget like and does not have the regular window.</p>
  
  <p>I want to know if there are some alternative approaches.</p>
  
  <p>A search of [wpf] resolution]<a href="https://stackoverflow.com/search?q=%5Bwpf%5D+resolution">1</a> gives a lot of questions addressing similar problem but still I'm stuck and not able to come to a conclusion how to achieve a good resolution-independent layout.</p>