title: ItemsControl with static header
body: <p>I think I have a pretty simple goal but cant seem to reach it.</p>
  
  <p>All I want to achieve is to have a ItemsControl (because I don't want the selection functionality of a list) with a header. Preferably a static header.</p>
  
  <p>Currently I'm using a grid for the header and then copying that grid into the ItemTemplate (DataTemple) of the ItemsControl and then placing them one above the other in a grid. It kinda works but its it doesn't always line up nicely etc.</p>
  
  <p>I then found the HeaderedItemsControl which I thought was a brilliant idea but cant get it to work, it just doesn't show the header at all. 
  I have tried the following; </p>
  
  <ul>
  <li>Just entering text into the "Header" of the Xaml</li>
  <li>Placing a grid with TextBlocks with static text within the ItemsControl.Header tag</li>
  <li>Placing the grid within the HeaderTemplate (Datatemplate) and binding it to a simple object</li>
  </ul>
  
  <p>I'm doing this all in Blend in a small project before moving it into the production app and I'm just using a simple sample data source which I created.</p>
  
  <p>I might be missing the boat completely here but any help would be appreciated.</p>
  
  <p>My current code is as follows, first is my HeaderedItemsControl</p>
  
  <pre><code>&lt;HeaderedItemsControl Header="HeaderedItemsControl"  
          ItemsSource="{Binding Collection, Mode=Default}" 
          ItemTemplate="{DynamicResource ItemsControlDataTemplate}" 
          HeaderTemplate="{DynamicResource ItemsControlHeaderDataTemplate}"/&gt;
  </code></pre>
  
  <p>then I've got a ItemTemple which works as expected</p>
  
  <pre><code>&lt;DataTemplate x:Key="ItemsControlDataTemplate"&gt;
          &lt;Grid d:DesignWidth="268"&gt;
              &lt;Grid.ColumnDefinitions&gt;
                  &lt;ColumnDefinition Width="0.754*"/&gt;
                  &lt;ColumnDefinition Width="0.246*"/&gt;
              &lt;/Grid.ColumnDefinitions&gt;
              &lt;TextBlock Text="{Binding Property1, Mode=Default}" TextWrapping="Wrap" d:LayoutOverrides="Height" HorizontalAlignment="Stretch" Margin="0" /&gt;
              &lt;TextBlock Text="{Binding Property2, Mode=Default}" TextWrapping="Wrap" d:LayoutOverrides="Height" Grid.Column="1" HorizontalAlignment="Left" Margin="0" /&gt;
          &lt;/Grid&gt;
      &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>and then the header which is defiantly opposing its work ethic, I've tried it with binding and with just plain text in the TextBlock.Text property</p>
  
  <pre><code>&lt;DataTemplate x:Key="ItemsControlHeaderDataTemplate"&gt;
          &lt;Grid d:DesignWidth="268"&gt;
              &lt;Grid.ColumnDefinitions&gt;
                  &lt;ColumnDefinition Width="0.754*"/&gt;
                  &lt;ColumnDefinition Width="0.246*"/&gt;
              &lt;/Grid.ColumnDefinitions&gt;
              &lt;TextBlock Text="{Binding Header.Header1, Mode=Default, Source={StaticResource SampleDataSource6}}" TextWrapping="Wrap" HorizontalAlignment="Stretch" Margin="0"/&gt;
              &lt;TextBlock Text="{Binding Header.Header2, Mode=Default, Source={StaticResource SampleDataSource6}}" TextWrapping="Wrap" d:LayoutOverrides="Height" Grid.Column="1" HorizontalAlignment="Left" Margin="0"/&gt;
          &lt;/Grid&gt;
      &lt;/DataTemplate&gt;
  </code></pre>