Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to switch between document tabs in AvalonDock 2

Tags:

c#

avalondock

I have build a little app that uses AvalonDock 2. I bound my view models to the docking manager, can create and remove documents, all fine. However, there is one thing I do net get to work: When I have multiple documents open I am not able to make a specific document tab the active and visible tab (like if I would click on the tab header) from code.

I have bound to the "ActiveContent" property and set it to the document I want to be the active and visible one, but that does not help.

Can please someone give me some advice on how to do that?

like image 600
Andreas Avatar asked Nov 30 '25 06:11

Andreas


1 Answers

After some research it turned out to be a trivial task. The actual problem is lack of documentation on such trivial tasks. So here for all others who fight with the same problem, the answer:

Each LayoutItem has a property named IsSelected. By setting its value to 'true', the tab representing the LayoutItem is switched into view.

like image 188
Andreas Avatar answered Dec 02 '25 19:12

Andreas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!