开发者

Extending Visual Studio with a Custom Designer

How do I create a custom Visual Studio 2008 UI designer for a C# file?

For example, when you double click on a DataSet in the Solution Explorer, a UI screen appears that allows you to edit the DataSet, even though it is defined in XML/code (which you can right click and "View Code").

Usually this code is separated from user code in some way, either by region ("Windows Forms Designer Generated Code"), by codegen (".g.cs" for WPF XAML files), or some other means like partial clas开发者_如何学Cses.


For some hints on Visual Studio Extensibility, see "Visual Studio 2010 addin writing articles/tutorials?". The Visual Studio SDK may have the information you need.


Well, you'd have to buy into the Visual Studio extension model. There are things you can do with the EnvDTE class. They are however fairly limited, not good enough to do what you want to do.

The next stop is the unmanaged extensibility model, based on COM. That requires writing unmanaged COM code, based on IVxxxx interfaces. Available to 3rd party addon developers like the company that makes Resharper. You have to get a license to write that kind of code, Microsoft won't be convinced you won't crash their product until you show some kind of proof you know what you are doing. You'll have to call, I think it is called the VSIP licence. That's possible, obviously it has been done.

Ask your company's legal counsel to take care of those hurdles.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜