title: Docking Top/Bottom/Left/Right/Filling in WPF
body: <p>i am win form developer. whenever i want to set any control at top/Bottom/Left/Right position in its container then we just play the controls dock property in winform. so just guide me how can i place a control in its container top/Bottom/Left/Right position in such a way as a result when contain size change then control position will not change in wpf. </p>
  
  <p>after searching google i came to know how filling works with Dock property and it is like</p>
  
  <pre><code>&lt;Window ...Other window props... &gt;
      &lt;Canvas HorizontalAlignment="Stretch" VerticalAlignment="Stretch"&gt;
          &lt;!-- Canvas items here... --&gt;
      &lt;/Canvas&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>So guide me how to set any control at top/Bottom/Left/Right position in its container  with code snippet.</p>
  
  <h2>UPDATE</h2>
  
  <p>i just come to know dock panel can be use for my requirement like this way</p>
  
  <pre><code>&lt;DockPanel LastChildFill="True"&gt;
      &lt;Button Content="Dock=Top" DockPanel.Dock="Top"/&gt;
      &lt;Button Content="Dock=Bottom" DockPanel.Dock="Bottom"/&gt;
      &lt;Button Content="Dock=Left"/&gt;
      &lt;Button Content="Dock=Right" DockPanel.Dock="Right"/&gt;
      &lt;Button Content="LastChildFill=True"/&gt;
  &lt;/DockPanel&gt;
  </code></pre>
  
  <p>any other way can i achieve this without using DockPanel. thanks</p>