You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/extensibility/adding-a-tool-window.md
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ ms.workload:
13
13
- "vssdk"
14
14
---
15
15
# Add a tool window
16
+
16
17
In this walkthrough you learn how to create a tool window and integrate it into Visual Studio in the following ways:
17
18
18
19
- Add a control to the tool window.
@@ -26,7 +27,8 @@ In this walkthrough you learn how to create a tool window and integrate it into
26
27
- Set the default position for the tool window.
27
28
28
29
## Prerequisites
29
-
Starting in Visual Studio 2015, you do not install the Visual Studio SDK from the download center. It is included as an optional feature in Visual Studio setup. You can also install the VS SDK later on. For more information, see [Install the Visual Studio SDK](../extensibility/installing-the-visual-studio-sdk.md).
30
+
31
+
The Visual Studio SDK is included as an optional feature in Visual Studio setup. For more information, see [Install the Visual Studio SDK](../extensibility/installing-the-visual-studio-sdk.md).
30
32
31
33
## Create a tool window
32
34
@@ -84,7 +86,8 @@ By adding a toolbar in the following manner, you guarantee that its gradients an
84
86
By setting the parent GUID and ID to the GUID and ID of the toolbar, you add the group to the toolbar.
85
87
86
88
## Add a command to the toolbar
87
-
Add a command to the toolbar, which is displayed as a button.
89
+
90
+
Add a command to the toolbar, which is displayed as a button.
88
91
89
92
1. In the `<Symbols>` section, declare the following IDSymbol elements just after the toolbar and toolbar group declarations.
90
93
@@ -132,7 +135,7 @@ public System.Windows.Controls.MediaElement MediaPlayer
132
135
## Instantiate the tool window and toolbar
133
136
Add a toolbar and a menu command that invokes the **Open File** dialog and plays the selected media file.
134
137
135
-
1. Open *FirstToolWindow.cs* and add the following `using`statements.
138
+
1. Open *FirstToolWindow.cs* and add the following `using`directives:
136
139
137
140
```csharp
138
141
usingSystem.ComponentModel.Design;
@@ -161,7 +164,7 @@ Add a toolbar and a menu command that invokes the **Open File** dialog and plays
@@ -177,7 +180,7 @@ Add a toolbar and a menu command that invokes the **Open File** dialog and plays
177
180
}
178
181
```
179
182
180
-
6. Addthemenucommandtothetoolbar. IntheFirstToolWindowCommand.cs class, add the following using statement
183
+
6. Addthemenucommandtothetoolbar. IntheFirstToolWindowCommand.cs class, add the following using directive:
181
184
182
185
```csharp
183
186
using System.Windows.Forms;
@@ -243,7 +246,8 @@ Add a toolbar and a menu command that invokes the **Open File** dialog and plays
243
246
```
244
247
245
248
## Set the default position for the tool window
246
-
Next, specifyadefaultlocationintheIDEfor the tool window. Configuration information for the tool window is in the *FirstToolWindowPackage.cs* file.
249
+
250
+
Next, specifyadefaultlocationintheIDEfor the tool window. Configuration information for the tool window is in the *FirstToolWindowPackage.cs* file.
247
251
248
252
1. In *FirstToolWindowPackage.cs*, find the <xref:Microsoft.VisualStudio.Shell.ProvideToolWindowAttribute> attribute on the `FirstToolWindowPackage` class, which passes the FirstToolWindow type to the constructor. To specify a default position, you must add more parameters to the constructor following example.
0 commit comments