title: Data binding inside ProgressBar value not working for DataGridTemplateColumn
body: <p>My problem is that I'm trying to display a ProgressBar value inside of a DataGridTemplateColumn, and the binding isn't wanting to work. It will work for my TextBlock (which is in the same Grid), but not the ProgressBar. </p>
  
  <p>I've gone to many references (Microsoft and StackOverFlow) to try and find my solution. However, none of them really help solve my solution with this binding.
  Main Helpful Examples: 
  <a href="https://stackoverflow.com/questions/7209631/progress-bar-bind-value">Progress Bar Bind Value</a> ,
  <a href="https://www.wpf-tutorial.com/misc-controls/the-progressbar-control/" rel="nofollow noreferrer">https://www.wpf-tutorial.com/misc-controls/the-progressbar-control/</a> ,
  <a href="https://stackoverflow.com/questions/49894696/wpf-how-to-display-text-on-progress-bar">WPF how to display text on progress bar</a> </p>
  
  <p>Also, I was originally passing PercentFull a double value (which I don't think worked) so that is why I'm passing it an Int value instead. However, either way the binding doesn't want to cooperate. </p>
  
  <p>XAML</p>
  
  <pre><code>&lt;DataGrid x:Name="dgViewData2" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="3" Background="Transparent" Foreground="White" AutoGenerateColumns="False"
      FontSize="18" FontWeight="Medium" BorderThickness="0" HorizontalGridLinesBrush="White" VerticalGridLinesBrush="White" Margin="10" IsHitTestVisible="False" CanUserAddRows="False"
      ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" HeadersVisibility="Column" Visibility="Collapsed"
      GridLinesVisibility="All" CanUserSortColumns="False" IsReadOnly="True"&gt;
      &lt;DataGrid.Resources&gt;
          &lt;Style TargetType="DataGrid"&gt;
              &lt;Setter Property="Background" Value="Transparent"/&gt;
              &lt;Setter Property="Focusable" Value="False"/&gt;
              &lt;Setter Property="IsHitTestVisible" Value="True"/&gt;
          &lt;/Style&gt;
          &lt;Style TargetType="DataGridColumnHeader"&gt;
              &lt;Setter Property="Background" Value="Transparent"/&gt;
              &lt;Setter Property="Focusable" Value="False"/&gt;
              &lt;Setter Property="HorizontalAlignment" Value="Right"/&gt;
              &lt;Setter Property="FontWeight" Value="Bold"/&gt;
              &lt;Setter Property="FontSize" Value="20"/&gt;
          &lt;/Style&gt;
          &lt;Style TargetType="DataGridRow"&gt;
              &lt;Setter Property="Background" Value="Transparent"/&gt;
              &lt;Setter Property="Focusable" Value="False"/&gt;
              &lt;Setter Property="HorizontalAlignment" Value="Right"/&gt;
          &lt;/Style&gt;
          &lt;Style TargetType="DataGridCell"&gt;
              &lt;Setter Property="HorizontalAlignment" Value="Right"/&gt;
              &lt;Style.Triggers&gt;
              &lt;Trigger Property="IsSelected" Value="True"&gt;
                  &lt;Setter Property="Background" Value="{x:Null}"/&gt;
                  &lt;Setter Property="BorderBrush" Value="{x:Null}"/&gt;
                  &lt;Setter Property="Foreground" Value="Transparent"/&gt;
              &lt;/Trigger&gt;
          &lt;/Style.Triggers&gt;
          &lt;/Style&gt;
      &lt;/DataGrid.Resources&gt;
      &lt;DataGrid.Columns&gt;
          &lt;DataGridTextColumn Width="150"  Binding="{Binding Identifyer}"/&gt;
          &lt;DataGridTextColumn Width="*"  Binding="{Binding Denomination}"/&gt;
          &lt;DataGridTextColumn Width="*"  Binding="{Binding Quantity}"/&gt;
          &lt;DataGridTextColumn Width="*" Binding="{Binding MaxQuantity}"/&gt;
          &lt;DataGridTextColumn Width="*"  Binding="{Binding TotalValue}"/&gt;
          &lt;!--&lt;DataGridTextColumn Width="*" Binding="{Binding PercentFull}"/&gt;--&gt;
          &lt;DataGridTemplateColumn Width="200" Visibility="Visible"&gt;
          &lt;DataGridTemplateColumn.CellTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;Grid&gt;
                  &lt;ProgressBar Name="pbCash" Width="200" Minimum="{Binding Path=PercentFullMin}" Maximum="{Binding Path=PercentFullMax}" Value="{Binding Path=PercentFull}" Background="Transparent" Foreground="DarkGreen" IsIndeterminate="False"/&gt;
                  &lt;TextBlock x:Name="tbProgress" Text="{Binding Path=PercentFullText, StringFormat={}{0}%}"  HorizontalAlignment="Center" VerticalAlignment="Center" Background="Transparent" Foreground="White"/&gt;
              &lt;/Grid&gt;
          &lt;/DataTemplate&gt;
          &lt;/DataGridTemplateColumn.CellTemplate&gt;
          &lt;/DataGridTemplateColumn&gt;
      &lt;/DataGrid.Columns&gt;
  &lt;/DataGrid&gt;
  </code></pre>
  
  <p>C# </p>
  
  <pre><code>public List&lt;Recycler_Data&gt; items2 { get; set; } = new List&lt;Recycler_Data&gt;(); //This is being set at the very top of the class.
  
  
  foreach (var r in data.Recyclers)
  {
      foreach (var c in r.Contents)
      {
          //Inserting Column Headers
          dgViewData2.Columns[0].Header = $"{item.Name}";
          dgViewData2.Columns[1].Header = "Value";
          dgViewData2.Columns[2].Header = "Qty";
          dgViewData2.Columns[3].Header = "Max Qty";
          dgViewData2.Columns[4].Header = "Total";
          dgViewData2.Columns[5].Header = "Full";
          string pfTxt = Convert.ToString((Convert.ToDouble(c.Quantity) / Convert.ToDouble(data.Capacity) * 100).ToString("0.00"));
          items2.Add(new Recycler_Data()
          {
              Identifyer = r.Identifyer,
              Denomination = c.Denomination.ToString().Remove(0, 3).Insert(0, " $"),
              Quantity = c.Quantity,
              MaxQuantity = item.Capacity,
              TotalValue = r.TotalValue.ToString().Remove(0, 3).Insert(0, " $"),
              PercentFullText = pfTxt,
              PercentFull = (Convert.ToInt32(c.Quantity) / Convert.ToInt32(data.Capacity) * 100),
              PercentFullMax = 100, 
              PercentFullMin = 0
          });
      }
  }
  dgViewData2.ItemSource = items2;
  </code></pre>
  
  <pre><code>public class Recycler_Data
  {
      public string Identifyer { get; set; }
      public string Denomination { get; set; }
      public long Quantity { get; set; }
      public object MaxQuantity { get; set; }
      public string TotalValue { get; set; }
      public string PercentFullText { get; set; }
      public int PercentFull { get; set; }
      public int PercentFullMax { get; set; }
      public int PercentFullMin { get; set; }
  }
  </code></pre>
  
  <p>So what I'm expecting is for the progress bar to show whatever number gets passed through PercentFull (obviously within 0 to 100).</p>