In the Visual Studio extension I'm developing, I provide a custom tool window.
I'm trying to find out if the user has the tool window docked to a side (left/right/top/bottom) or if it is floating. Is there a way to calculate the current position of my tool window and is there an event to know after a user has completed moving it?
Some background: I'm developing the CodeStream extension for Visual Studio. There is functionality that when a user selects code we show three circle buttons in the CodeStream tool window (it's actually a webview) to provide some actions. When the CodeStream panel is docked to the right, the 3 buttons are on the left side of the panel and this is correct.
But, if a user moves the CodeStream panel to the left side of screen or elsewhere, I'd like to be able to know that so I can direct our webview to move the 3 buttons to the right side of the screen. I've provided two screenshots below.
We also have a VSCode extension and I've implemented similar logic there.