Avalon Dock: Data bound title works in designer, but not when running app

Avalon Dock: Data bound title works in designer, but not when running app

I am currently trying to create a UI using Avalon Dock from Xceed WPF Toolkit 3. I created a much simpler version of this example. Basically, my view model looks like this:

namespace NonWorkingAvalonDock {

    public sealed class MainViewModel {

        public MainViewModel() {
            Pages = new SimplePageViewModel[] {
                new SimplePageViewModel("Foo"),
                new SimplePageViewModel("Bar")

        public SimplePageViewModel[] Pages { get; }

    public sealed class SimplePageViewModel {

        public SimplePageViewModel(string title) {
            Title = title;

        public string Title { get; }

And my XAML looks like this:

<Window x:Class="NonWorkingAvalonDock.MainWindow"
        Title="MainWindow" Height="350" Width="525">
        <local:MainViewModel x:Key="ViewModel" />
    <dock:DockingManager DataContext="{StaticResource ViewModel}" AnchorablesSource="{Binding Pages}" >
            <!-- you can add additional bindings from the layoutitem to the DockWindowViewModel -->
            <Style TargetType="{x:Type dockctrl:LayoutItem}" >
                <Setter Property="Title" Value="{Binding Model.Title}" />

When I look at the result in the Designer, It looks alright:

But when I run my application, the headers and titles are missing:

What is going wrong here?



I investigated the example and my code a bit more, and in the example, the author sets the data context in code behind. When I do this, it works for me, too.

Moreover, I did the following experiment: I made the Pages property privately writable, initialized it with null and used a Timer which sets the view models after one second. When I do this, I get the titles, too.

Is this a bug or do I have to do some additional stuff to make the binding appear without codebehind?