为自定义设计师编写Visual Studio扩展 [英] Writing a Visual Studio extension for a custom designer

查看:112
本文介绍了为自定义设计师编写Visual Studio扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我有一些想要尝试的东西.这个想法是要有一个可视化设计器来作为Visual Studio扩展,我希望能够拖出事件处理程序并建立行为,曾经使用Warcraft III脚本编辑器的任何人都会对我的想法有个好主意.我想做.在Visual Studio扩展性工具中是否可以轻松处理这类事情?如果是这样,我应该从哪里开始学习如何做呢?

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?

推荐答案

使用Visual Studio扩展工具绝对有可能.您将要创建一个VS Package.您可以使用几种不同的机制(宏,加载项和程序包)来扩展Visual Studio,但程序包是迄今为止功能最强大的.更具体地说,您应该研究创建自定义编辑器/设计器" .

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".

如果尚未下载,则需要下载Visual Studio 2010 SDK.有一个很棒的向导来创建新的VS包,它甚至会生成一个示例自定义编辑器",您可以将其用作自定义设计器的起点.我建议您通读向导生成的代码,直到您真正理解它为止.发生了很多的情况,因此可能需要一段时间.如果您想开始学习一本书,那么我发现的唯一的书几乎是 MSDN 代码示例,他们甚至有关于与自定义编辑器有关的10-15个示例!

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!

祝你好运!

这篇关于为自定义设计师编写Visual Studio扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆