如何通过Visual Studio 2010加载项装饰文档窗口 [英] How to decorate the document window from a Visual Studio 2010 Add-In

查看:58
本文介绍了如何通过Visual Studio 2010加载项装饰文档窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我想开发一个Visual Studio 2010外接程序,其目的是在文档窗口(从项目中打开任何文件时)在窗口的垂直左侧带有一些数字和彩色矩形,以装饰该窗口.

数字将与源内容管理系统中文档中的行所具有的版本相对应,而彩色小矩形将表示开发人员已添加这些行.
因此,总的来说,我的目标是使用"svn责备[文件名]"样式的附加内容来扩展Visual Studio的文档编辑窗口.

我只对特定的GUI部分感兴趣,这就是ActiveWindow装饰策略,因为后端似乎更容易实现.

感谢您阅读我的文章,
Mihnea

Hello everybody!

I would like to develop a Visual Studio 2010 add-in with the purpose of decorating the document window (when opening any file from within a project) with some numbers and small colored rectangles on the vertical left side of the window.

The numbers would correspond to the version within the source content management system that line within the document has, while the small colored rectangles would represent the developer having added those lines.

So, overall, my goal would be to augment the document editing window of Visual Studio with a "svn blame [filename]"-style additional content.

I am interested only in the specific GUI part, that is the ActiveWindow decoration strategy, as the backend seems much easier to do.

Thanks for reading my post,
Mihnea

推荐答案

扩展VS2010的首选方法是使用托管扩展框架或MEF,而不是较旧的加载项方法.
http://msdn.microsoft.com/en-us/vstudio/vextend.aspx [ ^ ]
http://msdn.microsoft.com/en-us/library/4k7zyeba.asp [ ^ ]
The preferred way to extend VS2010 is to use Managed Extensibility Framework, or MEF, rather than the older Add-in method.

http://msdn.microsoft.com/en-us/vstudio/vextend.aspx[^]
http://msdn.microsoft.com/en-us/library/4k7zyeba.asp[^]


这篇关于如何通过Visual Studio 2010加载项装饰文档窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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