question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No header (title) is shown for a LayoutAnchorable

See original GitHub issue

Version: 4.51.1 Visual studio 2019 and .Net 5.0

Consider the following simple MWE

<Window x:Class="Dirkster99AvalonDock.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ad="https://github.com/Dirkster99/AvalonDock"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:local="clr-namespace:Dirkster99AvalonDock"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        Title="MainWindow"
        Width="800"
        Height="450"
        mc:Ignorable="d">
    <Grid>
        <ad:DockingManager x:Name="dockManager">
            <ad:LayoutRoot>
                <ad:LayoutPanel Orientation="Vertical">
                    <ad:LayoutDocumentPane>
                        <ad:LayoutDocument Title="doc" CanFloat="True">
                            <Border Background="AliceBlue" />
                        </ad:LayoutDocument>
                    </ad:LayoutDocumentPane>
                    <ad:LayoutAnchorablePane DockHeight="100">
                        <ad:LayoutAnchorable Title="anchorable">
                            <Border Background="Gold" />
                        </ad:LayoutAnchorable>
                    </ad:LayoutAnchorablePane>
                </ad:LayoutPanel>
            </ad:LayoutRoot>
        </ad:DockingManager>
    </Grid>
</Window>

The result is image As shown above, the header of the LayoutAnchorable is not shown, which is supposed to display the title. Is this a bug, or did I miss anything?

[NOTE] If I simply change the avalon dock to the one in xceed wpftookit, then the title of the anchorable pane is shown as expected. Snipaste_2021-06-28_19-26-54

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
ShuhuaGaocommented, Jun 29, 2021

Update

The previous version v4.50.3 on NuGet has no problem. Thus, a bug was introduced after v4.50.3.

The following screenshot was obtained with v4.50.3 image

2reactions
dfraska-ftlcommented, Oct 13, 2021

Here’s the workaround that worked for me, since it wasn’t very clear from the previous comments:

In app.xaml:

Add the namespace

    xmlns:avalon="https://github.com/Dirkster99/AvalonDock"

Then, create a default style for the AnchorablePaneTitle based on AnchorablePaneTitleStyle

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/AvalonDock;component/Themes/generic.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <Style TargetType="{x:Type avalon:AnchorablePaneTitle}"
                   BasedOn="{StaticResource AnchorablePaneTitleStyle}"/>
        </ResourceDictionary>
    </Application.Resources>
Read more comments on GitHub >

github_iconTop Results From Across the Web

DocumentHeaderTemplate affects title set on ...
If I remove the DocumentHeaderTemplate I get my desired title on the anchorables, but not on my documents. My LayoutAnchorable follows:
Read more >
LayoutAnchorable Class
Represents an anchorable in the layout model.
Read more >
AvalonDock: recommended way to disable hiding behavior ...
Hi SirUppyPancakes , You found a bug. Yes, the "X" button is not available for LayoutAnchorable with CanClose set to true when it...
Read more >
AvalonDock
No header (title) is shown for a LayoutAnchorable $ 0. Created 2 years ago in Dirkster99/AvalonDock with 12 comments. Version: 4.51.1. Visual studio...
Read more >
Re: Option to remove/hide title and header section of ...
I'm wondering if there is a YAML setting or a way to modify the CSS/HTML that would remove the entire header section (Title,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found