Dirkster99 / AvalonDock

Our own development branch of the well known WPF document docking library
Microsoft Public License
1.41k stars 320 forks source link

Setting AllowsTransparency=True #310

Open dgosbell opened 2 years ago

dgosbell commented 2 years ago

In v4.60 (and earlier)- normally when you click on a "collapsed" anchorable you see the following and you can resize the window or pin it open:

image

If I add the following settings to the MainWindow.xaml in TestApp

    AllowsTransparency="True"
    WindowStyle="None"

What I see is the following: image

You can see by the fact that the cursor has changed to a horizontal resize cursor that the tool window is actually there, it is just completely transparent.

I'm using the FluentWindow from the FluentRibbon control for the main window of my app and by setting the window to AllowsTransparency=True I can add a corner radius and give my app a more modern Windows 11 feel, but this breaks the ability to pin/unpin tool windows.

lailablomme commented 2 months ago

I have a patch for this at https://sourceforge.net/p/laila-avalondock/code/ci/master/tree/ . Download the file and patch your Dirkster.AvalonDock v4.72.1 source code with it before you recompile.

shakisparki commented 4 days ago

Took me a whole day to narrow down that this was the problem. Somehow this was already identified 10 years ago https://stackoverflow.com/questions/25564409/avalon-dock-anchorable-control-is-not-working-if-allowtransparency-set-to-true but still coming to bite me in the ass, lol. @lailablomme why not make a pull request with the changes?