title: UWP Changing gridview element size programmatically
body: <p>I'm trying to use XAML binding to affect the gridview datatemplate element size from a slider on my screen.</p>
  
  <p>I have a gridview made of thumbnails images where the elements are defined as following:</p>
  
  <pre><code>         &lt;GridView.ItemTemplate  &gt;
              &lt;DataTemplate  &gt;
                  &lt;StackPanel Orientation="Vertical" 
                              HorizontalAlignment="Center" 
                              VerticalAlignment="Center" 
                              KeyDown="IsitenterThumb" 
                              BorderBrush="LightSeaGreen" 
                              BorderThickness="1"
                              PointerWheelChanged="ctlThumbnails_PointerWheelChanged"&gt;
                      &lt;Image Source="{Binding thumb}" 
                             x:Name="thumbimg"
                             Visibility="Visible"
                             Height="{Binding ItemSize}" Width="{Binding ItemSize, ElementName=page}" Stretch="Uniform" 
                             Tapped="ThumbnailSelected" 
                             DoubleTapped="CloseThumbnails"
                             /&gt;
                      &lt;TextBlock Text="{Binding name}" Margin="5,5" 
                                 Foreground="White" 
                                 Width="{Binding ItemSize}" 
                                 /&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>And I have the following variable defined as follow:</p>
  
  <pre><code>       public double ItemSize
         {
          get =&gt; _itemSize;
          set
          {
              if (_itemSize != value)
              {
                  _itemSize = value;
                  PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ItemSize)));
              }
           }
         }
  
        private double _itemSize;
  
        public event PropertyChangedEventHandler PropertyChanged;
  </code></pre>
  
  <p>I would have thought that changing the value of ItemSize would have affected the gridview datatemplate. This is taken litterally from the PhotoLab sample. </p>
  
  <p>Instead I get a single huge "thumbimg" per page... Any help would be greatly appreciated!</p>