Writing a Visual Studio extension for a custom designer

前端 未结 1 1054
借酒劲吻你
借酒劲吻你 2021-02-08 02:04

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

1条回答
  •  误落风尘
    2021-02-08 02:56

    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!

    0 讨论(0)
提交回复
热议问题