I know of the existence of the Running Document Table and how to access it using the Visual Studio SDK, but I can't seem to find a way to determine UX-specific attributes about the file, like if it's pinned in the editor.
Maybe you can try and get the IsPinned
state using GetProperty
and VsFramePropId
enum.