MEF:ErrorTag:如何使ErrorTag ToolTipContent在VS2010可扩展性组件中工作 [英] MEF: ErrorTag: how to get the ErrorTag ToolTipContent to work in VS2010 extensibility component
问题描述
环境详细信息:
Microsoft Visual Studio 2010版本10.0.40219.1 SP1版本
Microsoft .NET Framework版本4.5.51641 SP1Rel
安装的版本:Professional
Microsoft Visual Basic 2010 01018-532-2002102-70585
Microsoft Visual Basic 2010
问题:
我做了一个MEF扩展,它实现了ErrorTag/Margin Glyph组合,并且一切正常,但是我无法显示ErrorTag的工具提示.我确实看到了相关的花体"字样,所以我知道标签在这种意义上是有效的.
我的代码的类代码是用VB.net编写的:
朋友分类CodeSmellTag 继承ErrorTag 实现IGlyphTag',IErrorTag 私有m_TagType作为CodeSmellTagType 新建公共公开(TagType为CodeSmellTagType) MyBase.New(编译器警告",测试工具提示") m_TagType = TagType 结束子 公共ReadOnly属性TagType为CodeSmellTagType 得到 返回m_TagType 结束获取 最终财产 结束班级
有人对可能有用的ErrorTag和工具提示有任何经验吗?
Leigh Waldie,
同时,您可以阅读"添加工具提示". /p>
Environmental details:
Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel
Microsoft .NET Framework Version 4.5.51641 SP1Rel
Installed Version: Professional
Microsoft Visual Basic 2010 01018-532-2002102-70585
Microsoft Visual Basic 2010
Problem:
I have made a MEF extension that implements an ErrorTag/Margin Glyph combination and everything is working except that I cannot get the ErrorTag's tooltip to display. I do see the relevant "squiggle" so I know the tag is working in that sense.
My class code for the Tag is written in VB.net :
Friend Class CodeSmellTag Inherits ErrorTag Implements IGlyphTag ', IErrorTag Private m_TagType As CodeSmellTagType Public Sub New(TagType As CodeSmellTagType) MyBase.New("compiler warning", "Test Tool Tip") m_TagType = TagType End Sub Public ReadOnly Property TagType As CodeSmellTagType Get Return m_TagType End Get End Property End Class
Does anyone have any experience with ErrorTags and tooltips that might help?
Hi Leigh Waldie,
As far as I know, I think you need IErrorTag.ToolTipContent Property and ToolTip Class.
Meanwhile, you can read "Adding tooltips".
这篇关于MEF:ErrorTag:如何使ErrorTag ToolTipContent在VS2010可扩展性组件中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!