How do I add a tool in Visual Studio?
Skip to main content This browser is no longer supported. Show Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
In this articleApplies to: Visual Studio Visual Studio for Mac Visual Studio CodeIn this walkthrough you learn how to create a tool window and integrate it into Visual Studio in the following ways:
PrerequisitesThe Visual Studio SDK is included as an optional feature in Visual Studio setup. For more information, see Install the Visual Studio SDK.
By adding a toolbar in the following manner, you guarantee that its gradients and colors are consistent with the rest of the IDE.
Add a command to the toolbar, which is displayed as a button.
From the event handlers for the toolbar controls, your code must be able to access the Media Player control, which is a child of the FirstToolWindowControl class. In Solution Explorer, right-click FirstToolWindowControl.xaml, click View Code, and add the following code to the FirstToolWindowControl class.
Add a toolbar and a menu command that invokes the Open File dialog and plays the selected media file.
To implement a menu command in the tool window
Next, specify a default location in the IDE for the tool window. Configuration information for the tool window is in the FirstToolWindowPackage.cs file.
See also
Additional resourcesAdditional resourcesIn this article |