Determine index of IVsWindowFrame in a tab group #278
Replies: 1 comment
-
I found a way to this, but it's ugly and involves traversing the visual tree and reflection. If you have a UI element that you know is a descendent of a tab, then you can search up the visual tree until you find an internal type with the name DocumentGroupControl, this is an ItemsControl that contain all the tabs in the same tab group. The items are of an internal type called DocumentView and it has a property called WindowFrame which is of type IVsWindowFrame which can be retrieved thought reflection. The items in the ItemsControl are going to be in order so this way you can construct an ordered collection of IVsWindowFrame. Ugly, but it works (until an internal change is made that breaks the code). It's a pity that I haven't found a way to do this through the regular API. If anybody knows a way let me know so that I can rid of the above ugliness 😃 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to determine the order of tabs in a tab group.
I've tried a lot of different things, among them:
Is there any way to get the order of IVsWindowFrame in a tab group?
Beta Was this translation helpful? Give feedback.
All reactions