问题描述
我被要求为Visual Studio创建一个自定义设计器.在该设计师中,程序员可以使用控件创建/编辑表单并将其定位.
I've been asked to create a Custom Designer for Visual Studio. In this designer a programmer can create/edit Forms with controls and position them.
输入和结果将由外部系统使用和编译(有人告诉我Sesam,但从未听说过)
The input and result will be used and compiled by an external system (Sesam i've been told but never heard of it)
格式将为XML.
问题是,从哪里开始,创建定制设计器是否可行?
The question is, where do I start, is it even feasible to create a Custom Designer?
推荐答案
您可以创建自定义设计器,但是如何实现取决于您的要求.如果幸运的话,您可以使用一个简单的扩展程序,该扩展程序可以处理某些类型的文件,例如代码段设计器您可以在Codeplex上找到扩展名的代码.
You can create custom designers, but how you go about it depends on your requirements. If you're lucky, you can get away with a simple extension which handles editing certain types of files, such as the Snippet designer You can find the code for the extension on codeplex.
如果您不走运,您可能最终不得不创建自己的项目系统.这不是一个容易实现的解决方案,因为它需要对VS有深入的了解.
If you're not lucky, you may end up having to create your own project system. This is not an easy solution to implement, as it requires in-depth knowledge of VS.
此处是创建自定义文本编辑器的文档根目录,也称为简单路线.
这是XML团队写的一篇不错的博客文章,其中详细介绍了他们如何控制XML文件使用哪种类型的编辑器.了解他们是如何做到的,这可以帮助您确定是否可以只使用自定义编辑器.
This is a good blog post from the XML team which details how they control what type of editor is used on XML files. Knowing how they accomplish this may help you determine if you can go for just a custom editor.
这篇关于创建定制设计师的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!