How to add panel on the left visual studio extension - c#

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.

You need to create a tool window and then manually position it at the desired place.
See Async Tool Window example to get started.

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:
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.

Related

Windows 10 File Browser popup menu showing New items

Using:
Visual Studio 2017
Windows Form
C#
I know how to create a Popup menu displaying items that I have added with code to a native WinForm ContextMenuStrip control.
For example:
My coded Popup menu
What I am looking for and trying to achieve and I have not found so far is how to populate a ContextMenuStrip or any alternative control with the Items that show up when you right click on a blank space on File Explorer and select New and displays a list of the Items you can create base on what you have installed on your computer.
For example:
File Explorer Popup Menu > New
I have looked at many suggestion on different sites but they all show what I already know in how to add items manually and none explain how to add the Items that show up in the File Explorer New sub menu.
Could anyone tell me if this is even possible and/or point me to the right place.
Regards,
You're describing the problem as if it were some programming task, so most probably, it's not the thing you expect to see. Adding items to that menu is more of a problem of configuration of the almighty 'explorer.exe'..
Please see here and read where to place item templates and how to register "file classes" for them in the registry.
I don't like answers like this that just drop a link to other resource, but it's not reasonable to copy&paste&redact it all not knowing if it's what you really want..
Also, note that if you see your desktop, then 'explorer.exe' is already running, and editing its configuration in the registry probably won't take any effect until this process is restarted. Typically you get advices like in that article above:
To have this change take effect, you need to restart your PC, not just sign out and back in.
But that's not true. Just kill explorer.exe via task manager, and then start it back again. No need to reboot.

Is there a way to add a button to an existing tab or add a new tab in the file explorer ribbon?

I'm trying add a button or tab to the default Windows 10 file explorer ribbon.
I've tried looking up different solutions but I've only come up with things for MS Office which not what I'm trying to add to. I've included a screenshot to explain where I'd like to add the button/tab.
Is this even possible in C# and Visual Studio? Are there other solutions for this that require other tools/languages?
EDIT: The suggested answer adds a panel to either side of the window. What I'm looking to do is change the ribbon at the top of the window by either adding a button or tab to the existing tabs

Visual Studio 2013 Add custom toolbar Button

Hey all I have been searching Google for a while now trying to find anything on how to go about setting up you're own button on the VS toolbar.
What I am talking about is this:
And when I click on that button I would like to be able to execute some C# code.
As an example, say I had the word "HELLO" highlighted and I pushed on that button on the toolbar and I wrote some code behind it that, when pressed, have whatever is highlighted turn bold and change color from normal BLACK to .
I was originally thinking that it was called Visual Studio Extensibility Tools but that doesn't seem to be what I am looking for here - it seemed more as a Nuget plugin type of thing?
I'm looking for more like what you can do with the Office suite of products within VS addins - As in make a button for Outlooks toolbar, etc..
The only remotely close thing I could find so far would be this.
If anyone has done this before or at least know what to search for then please let me know!
You were on the right track with Visual Studio Extensiblilty tools.
There are several steps.
Create the Toolbar and add the button.
Create the event handler that runs when the button is clicked.
Determine what document has focus (c# doc, xml doc, vb doc, etc.)
Determine what is selected in the document.
Change the code formatting
Start with an overview of the Extensions SDK.
Here's how to create a toolbar with the VS extensions.
Creating a Toolbar for the IDE

Toolbars in ToolStripContainer don't keep their position

I don't know why this is happening... But, every time I open the designer for a form, the toolbars in the ToolStripContainer move one under the other, instead of being all on the same line (how I left it before).
Is there any fix to this problem?
It is because Visual Studio, by default, adds the Layout Toolbar to the ToolStripContainer.
Visual Studio keeps seperate layouts of the ToolStripContainer for different types of editors. It makes sense since for example, when you are editing a form in the form designer you do not need the Text Editor toolbar. Similarly a Dialog editor toolbar is unnecessary when the text editor is opened. For example, you may try to open an xml file and by default, the Xml Editor Toolbar is added to the container.
Any arrangement made to the container is kept, but seperately. You can manually open close toolbar items to arrange the container however you like.

Can't get rid of crosshair (place new item) cursor in Visual Studio 2010 xaml editor

I'm inside a XAML page, in the Design screen. Somehow I got VS2010 into a mode where it changes the cursor to crosshairs, and when you click you place a UIElement where you clicked. I can't figure out a) how I got into this mode in the first place, and b) how to get out. I like to be able to click on elements in the Design view and automatically navigate to the XAML associated with it, and I can't get back into that mode.
Any ideas?
PS- I'm in Visual Studio Express 2010 for C#, if that makes any difference.
Ok, I figured it out, thanks to Michael Todd. Here is the answer:
The ToolBox usually holds a button for the standard Pointer, which gets you out of the mode I mentioned above. However, if you have edited the display options on the ToolBox, then it may be buried or (possibly?) not visible at all. To fix this, right click on any item in the ToolBox window and select "Reset Toolbox" from the popup menu. The "Pointer" option should now be at the top of the list, under almost every section.

Categories

Resources