Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Writing a Visual Studio extension for a custom designer

So, I've got something I want to try out. The idea is to have a visual designer that works as a Visual Studio Extension, I want to be able to drag out event handlers and wire up behaviors, anyone who's ever played with the warcraft III script editor will have a pretty good idea what I'm wanting to do. Is this kind of thing readily handled in the visual studio extensibility tools? If so where should I start looking to learn how to do this?

like image 383
Firoso Avatar asked Feb 01 '10 16:02

Firoso


People also ask

Is Visual Studio customizable?

You can personalize Visual Studio in various ways to best support your own development style and requirements. Many of your settings roam with you across Visual Studio instances—see Synchronized settings.

What are Visual Studio extensions?

Extensions are add-ons that allow you to customize and enhance your experience in Visual Studio by adding new features or integrating existing tools. An extension can range in all levels of complexity, but its main purpose is to increase your productivity and cater to your workflow.

How do I run code in Visual Studio code?

To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and VS Code will try to run your currently active file.


1 Answers

It's absolutely possible using the Visual Studio Extensibility tools. You'll want to create a VS Package. There are a few different mechanisms (macros, add-ins, and packages) you can use to extend Visual Studio, but Packages are by far the most powerful. More specifically, you should look into creating a "Custom Editor/Designer".

You'll need to download the Visual Studio 2010 SDK if you haven't already. There's a fantastic wizard for creating new VS Packages which will even generate a sample "Custom editor" that you can use as a starting point for your custom designer. I'd recommend reading through the code that the wizard generates until you really understand it. There's a lot of stuff going on, so it can take a while. If you want a book to get started, pretty much the only one I've found is Professional Visual Studio Extensibility, but there are other good resources on the internet. A few I've used are MSDN and DiveDeeper's VSX blog. Probably the best way to get started is reading the code samples from the VSX team, they even have about 10-15 samples related to custom editors!

Good luck!

like image 92
Matt Avatar answered Nov 15 '22 22:11

Matt