Search code examples
c#visual-studiovisual-studio-2015visual-studio-extensions

Explain different components generated for CustomToolWindow in VisualStudio 15 extension template?


Whenever we create a CustomToolWindow in visual studio extension template it creates some files by itself , can anyone explain the significance of each file ? For example if create a CustomToolWindow by the name "Sample" , it creates the following :

Sample.cs
SampleCommand.cs
SampleControl.xaml
SamplePackage.vsct

Or any documentation on the above .

Thanks, Dipankar


Solution

  • A simple extension here: https://learn.microsoft.com/en-us/vsts/integrate/ide/extensions/hello_world Provide much more information even if it was about the Custom command, but my understanding they would have the same functions:

    The VSCT file is where you can rename your commands, as well as define where they go in the Visual Studio command system. As you explore the VSCT file, you will notice a lot of commented code that explains what each section of code controls.

    The CS file is where you can define actions, such as the click handler.

    You could also get better understanding these files through this extension sample:

    https://msdn.microsoft.com/en-us/library/cc138567.aspx