title: C# WPF how to set location,width and height of the controls programmatically?
body: <p>I'm doing my first WPF application. im having problem whereby when my form is maximized or fullscreen, my controls wont resize and just stay in the same location. only the form is maximized.</p>
  
  <p>in winform, I can do the adjustment in the .cs like the following:</p>
  
  <pre><code>panel6.Width
  panel6.Height
  panel6.Location
  </code></pre>
  
  <p>this will help me set it if my form is maximized. I do it by using some arithmetics where I get the resolution of screen and some calculation and get the value and can set it to the width, height and location.
  BUT THIS IS IN WINFORM.</p>
  
  <p>how will I tackle this issue for maximized and fullscreen in WPF? is there a way to be done through the .cs file programmatically? or does WPF come with a easy built in control to tackle this issue?</p>
  
  <p>suppose for this example I'm using dockpanel in the WPF.</p>
  
  <p>it will be pointless if window is maximized but the other controls remains.</p>