How to add panel on the left visual studio extension

341 views Asked by At

I am trying to add a panel to visual studio for my extension. I want it to be similar to the server explorer but just be below it. Does anyone know how I can add a blank panel like that just below the server explorer for my extension? I want to display some text on that panel.

2

There are 2 answers

5
Sergey Vlasov On

You need to create a tool window and then manually position it at the desired place.

See Async Tool Window example to get started.

0
LoLance On

Also, you can find the guide here: create an extension with a Tool Window.

Just create a new VSIX project and add the tool window Item template. It works like a wpf window, you can modify its xx.xaml file to set the window's appearance. Add a textbox to display some texts or what. You can build and debug it(F5) to start the experimental instance. During debugging, go find your window and open it. Then drag it to left layout and it will display next to the server explorer.

When dragging the window, choose the left layout:

enter image description here

And to make it locates just below the server explorer:

(Sometimes the custom panel is above not below the server explorer)You can change the order by the pin button. Click it twice can help.

enter image description here