title: How do I dynamically size a GridView Item?
body: <p>I have a Grid View that is used to display "tags" which is a list of strings that are dynamic in size.  Using the following code:</p>
  
  <pre><code>&lt;GridView ItemsSource="{Binding Tags}" 
            ItemTemplate="{StaticResource TagTemplate}" 
            VerticalAlignment="Bottom"
            Grid.RowSpan="2"
            SelectionMode="None"
            /&gt;
  </code></pre>
  
  <p>I use the following Template for the items:</p>
  
  <pre><code>&lt;DataTemplate x:Name="TagTemplate"&gt;
      &lt;Border BorderBrush="Gray" BorderThickness="1" Opacity="75"&gt;
          &lt;TextBlock Text="{Binding}"/&gt;
      &lt;/Border&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>When added to the Grid, the size of each of the items are the same size as the first:</p>
  
  <p><img src="https://i.stack.imgur.com/9UYe1.png" alt="enter image description here"></p>
  
  <p>How do I dynamically size the items within the GridView?</p>