title: WPF: Adding a ProgressBar to ListBox Items
body: <p>I'm trying to make the background of my ListBoxItems to be constituted of a ProgressBar, but the "Z-Index" thing is not seemingly working for me. I have read somewhere that Grid doesn't support Z-Index (like Canvas) and that by default elements are rendered in the order they are added. This is what apparently happens in my case too. But when I click on a listbox item, my TextBlock (see below) disappears, apparently because the ProgressBar comes to front. Interestingly, the other child controls (image and animation) do not disappear, so I'm kind of puzzled. </p>
  
  <p>Here's my ListBox's ItemTemplate:</p>
  
  <pre><code>&lt;ListBox.ItemTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;Grid Name="ListBoxGrid"&gt;
              &lt;Grid.RowDefinitions&gt;
                  &lt;RowDefinition Height="100"/&gt;
              &lt;/Grid.RowDefinitions&gt;
              &lt;Grid.ColumnDefinitions&gt;
                  &lt;ColumnDefinition Width="Auto"/&gt;
                  &lt;ColumnDefinition Width="*"/&gt;
                  &lt;ColumnDefinition Width="100"/&gt;
              &lt;/Grid.ColumnDefinitions&gt;
              &lt;ProgressBar Grid.Column="0" Grid.ColumnSpan="3" Background="White" Value="{Binding Path=SendProgress}" /&gt;
              &lt;Image Width="50" Stretch="Uniform" Grid.Column="0" HorizontalAlignment="Center" Margin="20,0,0,0" VerticalAlignment="Center" Source="{Binding Image}" /&gt;
              &lt;TextBlock FontSize="16" Grid.Column="1" VerticalAlignment="Center" Text="{Binding Path=ImageFilePath, Padding="20,0,0,0" /&gt;
              &lt;Canvas Grid.Column="2"&gt;
                  &lt;Image Canvas.Left="25" Canvas.Top="25" Width="50" Height="50" Source="{Binding Status}" /&gt;
                  &lt;my:LoadingAnimation HorizontalAlignment="Center" VerticalAlignment="Center" Width="100" Height="100" Canvas.Left="5" Canvas.Top="5" Visibility="{Binding IsSending, Converter={StaticResource BooleanToVisibilityConverter1}}" /&gt;
              &lt;/Canvas&gt;
          &lt;/Grid&gt;
      &lt;/DataTemplate&gt;
  &lt;/ListBox.ItemTemplate&gt;
  </code></pre>