Hi,
Can you just use the Content.Title, not the Name of the ActiveContent :
Can you just use the Content.Title, not the Name of the ActiveContent :
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
_avalon.DataContext = this;
this.OpenProjects = new ObservableCollection<LayoutDocument>()
{
new LayoutDocument() { Title = "First", Content = "Test First"},
new LayoutDocument() { Title = "Second", Content = "Test Second"},
new LayoutDocument() { Title = "Third", Content = "Test Third"},
new LayoutDocument() { Title = "Fourth", Content = "Test Fourth"},
};
}
public ObservableCollection<LayoutDocument> OpenProjects
{
get;
set;
}
}
<ad:DockingManager x:Name="_avalon"
DocumentsSource="{Binding Path=OpenProjects, Mode=TwoWay}">
<ad:DockingManager.DocumentHeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding Content.Title}" />
</DataTemplate>
</ad:DockingManager.DocumentHeaderTemplate>
</ad:DockingManager>