I'm trying to find out where the items in a HeaderedContentControl come from in a project that's not mine. Here's the code:

        <HeaderedContentControl 
            Content="{Binding Path=Workspaces}"
            ContentTemplate="{StaticResource WorkspacesTemplate}"
            Header="Workspaces"
            Style="{StaticResource MainHCCStyle}" 
            DataContext="{Binding}" // <--- this 
       />

<DataTemplate x:Key="WorkspacesTemplate">
<TabControl 
  IsSynchronizedWithCurrentItem="True" 
  ItemsSource="{Binding}" 
  ItemTemplate="{StaticResource ClosableTabItemTemplate}"
  Margin="4"
  />

so let's examine it:

  1. ContentTemplate attribute describes how the items are desplayed.
  2. WorkspacesTemplate sets ItemsSource's attribute to {Binding} meaning it's bound to its DataContext property (DataContext of HeaderedContentControl)
  3. So I look at HeaderedContentControl's dataContext, but it is described as "{Binding}" as well...

What does that mean?

Edit
Report