AvalonDock
AvalonDock copied to clipboard
Document visibility question
Hello,
I'm trying to build a demo application that will host a few different views on the same context. Since I want the UI to be composable I'm trying the library to that effect.
My program will eventually be MVVM, so I'm building it up following the demo MVVM app in your codebase.
I've managed to have 3 types of control that are loaded (as documents) depending on the type of ViewModel (inheriting from a common interface). I'm building the three viewmodels at startup.
I would like each document tab to disappear if I set IsVisible to false (that is also synchronised with a menu to make it visible again, just as in the demo app).
I've attached the CloseCommand to set IsVisible to false.
Here's where I'm finding behaviours that I don't understand.
Attempt 1
With a converter that makes IsVisible <-> Hidden
All three documents disappear at once, when all three viewmodel's IsVisible
are set to false, but if even one of them is true then they are all visible.
When even one is then turned back to true, all three appear again.
Attempt 2
With a converter that makes IsVisible <-> Collapsed
Documents disappear when I set the IsVisible to False independently (as expected), however they do not appear back if I set the property back to true via the menu.
Question
Any advice, would be super welcome. I can make the code available for review, if it helps.
Many thanks, Claudio
I am having the same issue, It works with the LayoutAnchorable (kinda) and you can modify the LayoutAnchorable to make it looks like a classical Tab. The issue with the LayoutAnchorable is that once you implement the Load layout, some tabs can become invisible if the DockingManager is reloaded, only to be visible again when it loads again. I opened an issue attaching my example (in case it can be helpful for what you are doing) https://github.com/Dirkster99/AvalonDock/issues/283