Hello @Hepzibah C ,
Thanks for your reply.
This document: VsDockStyle indicates that
You cannot specify that a tool window is docked by default.
A very close method to dock the custom tool window when it opens for the first time is to dock it with other windows like Solution Explorer, Output Window…
An example(dock with Solution Explorer):
Using following code:
[ProvideToolWindow(typeof(ToolWindow1),
Orientation = ToolWindowOrientation.Right,
Window = "3ae79031-e1bc-11d0-8f78-00a0c9110057",
Style = VsDockStyle.Tabbed)]
Steps:
1.Create a new VSIX project => right-click the project => Add => New Item…
2.Select Tool Window => Add => open xxxxPackage.cs file => Modify above code
3.Run the project => for the first time it opens, it docks on the right with Solution Explorer, if it doesn’t display, try to click View => Other Windows => ToolWindow1 to open it.
BTW, as it works for the very first time, you may need to create and use a new project to test.
Sincerely,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.