I am using Xceed.Wpf.AvalonDock to arrange views with a row of tabs along the top like in a WPF TabControl.
I am using it in an MVVM pattern like this:
<xcad:DockingManager Name="dock" DocumentsSource="{Binding VMs}" AllowMixedOrientation="True">
<xcad:DockingManager.DocumentHeaderTemplate >
<DataTemplate>
<!-- This defines the content of a single tab: -->
<StackPanel Orientation="Horizontal" MinWidth="100">
<Image Source="{Binding IconSource}" Margin="0,0,4,0"/>
<TextBlock Text="{Binding Title}" />
</StackPanel>
</DataTemplate>
</xcad:DockingManager.DocumentHeaderTemplate>
<xcad:DockingManager.Resources>
<DataTemplate DataType="{x:Type vm:MyViewModel}">
<v:MyView/>
</DataTemplate>
Now I would like to add an extra tab at the top with a plus-character or similar, indicating to the user that they can add an extra tab / view by clicking on it. It would look similar to Chrome or Edge browsers.
How can I do that? Creating an empty view model and view just to receive clicks on the tab does not seem like a good way.