title: Placing multiple canvases in a Grid
body: <p>I want to place several canvases into a grid, each containing an image (and some drawing on top). When I do so, all canvases occupy the same space (almost). Can anyone explain?</p>
  <p>This is the XAML:</p>
  <pre><code>&lt;Window x:Class=&quot;WpfApp4__Various_Tests_.MainWindow&quot;
      xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
      xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
      xmlns:local=&quot;clr-namespace:WpfApp4__Various_Tests_&quot;
      Title=&quot;MainWindow&quot; Height=&quot;300&quot; Width=&quot;300&quot;
      x:Name=&quot;root&quot;&gt;
  
  &lt;Grid Background=&quot;Beige&quot; ShowGridLines=&quot;True&quot;&gt;
      &lt;Grid.ColumnDefinitions&gt;
          &lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
          &lt;ColumnDefinition Width=&quot;Auto&quot; /&gt;
      &lt;/Grid.ColumnDefinitions&gt;
  
      &lt;Canvas Grid.Column=&quot;0&quot;&gt;
          &lt;Image Source=&quot;nav_plain_blue.ico&quot; /&gt;
      &lt;/Canvas&gt;
      &lt;Canvas Grid.Column=&quot;1&quot;&gt;
          &lt;Image Source=&quot;nav_plain_blue.ico&quot; /&gt;
      &lt;/Canvas&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>And this is the result:</p>
  <p><a href="https://i.stack.imgur.com/fDic3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fDic3.png" alt="enter image description here" /></a></p>
  <p><strong>EDIT</strong>: I noticed, when I use <code>Width=&quot;*&quot;</code> in the grid both canvases are shown. I still don't understand why it doesn't work with Auto-size.</p>