title: WPF Expander overlay used in ItemsControl
body: <p>I've been searching for some time but all solution I find only tackle parts of my issue.
  I'd like to have an ItemsControl with each item containing an Expander. On expanding, the Expander's content should be shown as an overlay overlapping the other items in the ItemsControl and not moving them down.</p>
  
  <p>The following XAML-Code does exactly as supposed to with one big issue: The Expander's content does not overlap the other items but is hidden behind them. I suppose this is due to the ZIndex as the following items in the ItemsControl are added after the Expander's content.</p>
  
  <p>I managed to set one single Expander's ZIndex to 99 using style triggers but this seems to be a too complicated and error-prone solution. Any thoughts?</p>
  
  <pre><code>&lt;Window x:Class="WpfTest.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow"
          Height="350"
          Width="525"&gt;
  
    &lt;Window.Resources&gt;
  
      &lt;x:Array x:Key="items"
               Type="sys:String" 
               xmlns:sys="clr-namespace:System;assembly=mscorlib"&gt;
        &lt;sys:String&gt;One&lt;/sys:String&gt;
        &lt;sys:String&gt;Two&lt;/sys:String&gt;
        &lt;sys:String&gt;Three&lt;/sys:String&gt;
        &lt;sys:String&gt;Four&lt;/sys:String&gt;
      &lt;/x:Array&gt;
  
      &lt;DataTemplate x:Key="template"&gt;
        &lt;Grid Background="Red" Margin="0,0,0,10"&gt;
          &lt;Grid.RowDefinitions&gt;
            &lt;RowDefinition Height="Auto" /&gt;
            &lt;RowDefinition Height="Auto" /&gt;
          &lt;/Grid.RowDefinitions&gt;
  
          &lt;TextBlock Text="{Binding}" /&gt;
          &lt;Canvas Height="25" Grid.Row="1"&gt;
            &lt;Expander ExpandDirection="Down" Header="Header" Grid.Row="1"&gt;
              &lt;Expander.Content&gt;
                &lt;TextBlock Height="80" Text="Content" Background="Yellow" /&gt;
              &lt;/Expander.Content&gt;
            &lt;/Expander&gt;
          &lt;/Canvas&gt;
        &lt;/Grid&gt;
      &lt;/DataTemplate&gt;
  
    &lt;/Window.Resources&gt;
  
    &lt;Grid&gt;
      &lt;ScrollViewer&gt;
        &lt;ItemsControl ItemsSource="{StaticResource items}"
                      ItemTemplate="{StaticResource template}"
                      HorizontalContentAlignment="Stretch"&gt;
        &lt;/ItemsControl&gt;
      &lt;/ScrollViewer&gt;
    &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>