1

I'm wondering is it possible to get is document pinned or not on VS tab bar, since this functionality was added only in 2012 VS it's hard to find any examples of people trying to do something with it. MSDN manual isn't helping on that matter either, because I guess the only way to find something about envDTE is through search.

I thought it should be stored somewhere in EnvDTE.Document or EnvDTE.Window objects but can't see anything related in there. But I'm probably missing something since they're not looking like they've been updated since the old Visual Studio versions.

So my question is - is there any way to achieve this kind of information?

2
  • Can you clarify what you mean by "get is document pinned"? Feb 2, 2014 at 0:30
  • @PeterRitchie In VS starting from 2012 you can press pin sign on document header in a tab bar so tabs with such documents would always stay in the beginning of the list. I probably should have written document tab pinned or document window pinned to be more clear.
    – Predelnik
    Feb 2, 2014 at 0:46

1 Answer 1

2

The magic IVsWindowFrame property to query for is __VSFPROPID5.VSPROPID_IsPinned. So once you have an IVsWindowFrame, you can call GetProperty and that'll give you the pinned state.

2
  • Ok, I figured it all out, woohoo) On the other hand I still don't understand how could I find anything about it by myself initially, though maybe this is what actually called advanced usage :)
    – Predelnik
    Feb 9, 2014 at 10:52
  • Well, yeah, experience helps here. The EnvDTE interfaces are very "simple" interfaces that don't expose most functionality, and they aren't updated for new features. For stuff like this, that's the last place to look. I myself guessed it was IVsWindowFrame property because that's where other tab properties live (like captions and such.) Feb 9, 2014 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.