In Avalon dock , Title and Dock combobutton options not appearing for LayoutAnchorable WPF application

217 Views Asked by At

Through Nuget install the Dirkster.AvalonDock 4.5 and its in the reference Here is my xaml code for the mainwindow

<Window x:Class="AvalonDocTestApp.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
            xmlns:local="clr-namespace:AvalonDocTestApp"
            mc:Ignorable="d"
            Title="MainWindow" Height="450" Width="800">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Column="0">
                <local:UserControl1/>
            </StackPanel>
            <Grid Grid.Column="1">
                <DockingManager Grid.Row="1" x:Name="dockManager" AllowMixedOrientation="True">
                    <LayoutRoot>
                    <LayoutPanel Orientation="Horizontal">
                    <LayoutAnchorablePaneGroup DockWidth="150">
                        <LayoutAnchorablePane>
                            <LayoutAnchorable ContentId="toolWindow1" Title="Tool Window 1" >
                                        <StackPanel>
                                            <TextBox Text="{Binding TestTimer, Mode=OneWay, StringFormat='Tool Window 1 Attached to Timer ->\{0\}'}"/>
                                        </StackPanel>
                            </LayoutAnchorable>
                        </LayoutAnchorablePane>
                    </LayoutAnchorablePaneGroup>
                    </LayoutPanel>
                    </LayoutRoot>
                </DockingManager>
            </Grid>    
        </Grid>
    </Window> 

The above code for the LayoutAnchorable section textbox appears without any title and dock combobutton

2

There are 2 best solutions below

1
Sachin Daniel Varkey On

This issue was found in avalon dock 4.5.51 version in Nu-get installation. When I installed avalon dock 4.0.0 version, the title, dock options start appearing.

0
dmm On

As described by by the op, the issue seems to arise from different versions of Avalondock. I had the same Problem and noticed the following:

  • Versions below 4.50.3 seem to work
  • the reason for this seems to be, that from Version 4.51.1 onwards, Avalondock has a dependency on "net5.0-windows7.0" which in my case the application did not support

So reverting the version to 4.50.3 or lower fixed the conflict.