title: Elements are not shown with ItemsPanelTemplate
body: <p>I just try to understand the concept of the ItemsPanelTemplate. For this i built a small sample solution.</p>
  
  <p>I have a UserControl "MyListView" with the following Code.</p>
  
  <p>MyListView.xaml:</p>
  
  <pre><code>&lt;UserControl x:Class="WpfApplication2.MyListView"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
           mc:Ignorable="d" 
           d:DesignHeight="300" d:DesignWidth="300"&gt;
  &lt;UserControl.Resources&gt;
      &lt;Style  TargetType="ListViewItem"&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="ListViewItem"&gt;
                      &lt;Grid&gt;
                          &lt;Grid.RowDefinitions&gt;
                              &lt;RowDefinition Height="Auto" /&gt;
                              &lt;RowDefinition Height="Auto" /&gt;
                          &lt;/Grid.RowDefinitions&gt;
                          &lt;Border BorderBrush="Black" BorderThickness="1" Margin="0" Padding="0" Width="100" Background="Gray"&gt;
                              &lt;TextBlock Text="Text" HorizontalAlignment="Center"  /&gt;
                          &lt;/Border&gt;
                      &lt;/Grid&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/UserControl.Resources&gt;
  
  &lt;ListView ItemsSource="{Binding Path=TreeItemChildren}"&gt;
      &lt;ListView.ItemsPanel&gt;
          &lt;ItemsPanelTemplate&gt;
              &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch"&gt;
  
              &lt;/StackPanel&gt;
          &lt;/ItemsPanelTemplate&gt;
      &lt;/ListView.ItemsPanel&gt;
  &lt;/ListView&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>In MyListView.cs I added a DependencyProperty to bind the data to that should be displayed:</p>
  
  <pre><code>public partial class MyListView : UserControl
  {
      public MyListView()
      {
          this.TreeItemChildren = new ObservableCollection&lt;string&gt;();
          this.TreeItemChildren.Add("Text0");
          this.TreeItemChildren.Add("Text1");
          this.TreeItemChildren.Add("Text2");
  
          InitializeComponent();
      }
  
      public ObservableCollection&lt;string&gt; TreeItemChildren
      {
          get { return (ObservableCollection&lt;string&gt;)GetValue(TreeItemChildrenProperty); }
          set { SetValue(TreeItemChildrenProperty, value); }
      }
  
      // Using a DependencyProperty as the backing store for TreeItemChildren.  This enables animation, styling, binding, etc...
      public static readonly DependencyProperty TreeItemChildrenProperty =
          DependencyProperty.Register("TreeItemChildren", typeof(ObservableCollection&lt;string&gt;), typeof(MainWindow), new UIPropertyMetadata(null));
  }
  </code></pre>
  
  <p>When I now try to use this UserControl in my MainWindow, there is no data to be displayed. What is the reason for that?</p>