title: WPF how to display text on progress bar
body: <p>I have a DataGrid, one column is designed to display download percent. 
  Below is my code:</p>
  
  <pre><code>&lt;DataGridTemplateColumn Header="Percent" IsReadOnly="True" Width="*"&gt;
      &lt;DataGridTemplateColumn.CellTemplate&gt;
          &lt;DataTemplate&gt;
              &lt;DockPanel&gt;
                  &lt;Button Margin="5,0,0,0" DockPanel.Dock="Right" VerticalContentAlignment="Center" Style="{StaticResource BasicButtonStyle}" Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type DataGrid}}, Path=DataContext.StopButtonClickCommand}" &gt;
                      &lt;Image Height="12" Source="/Client;component/Resources/Images/stop.png" /&gt;
                  &lt;/Button&gt;
                  &lt;ProgressBar Value="{Binding Path=Percent, Mode=OneWay}" Minimum="0" Maximum="100" /&gt;
                  &lt;TextBlock Text="{Binding Path=Percent , StringFormat={}{0}%}" HorizontalAlignment="Center" &gt;&lt;/TextBlock&gt;
              &lt;/DockPanel&gt;
          &lt;/DataTemplate&gt;
      &lt;/DataGridTemplateColumn.CellTemplate&gt;
  &lt;/DataGridTemplateColumn&gt;
  </code></pre>
  
  <p>I want to display the text on progress bar, at same time keep the button on the right. How should I modify my code?</p>