[英]How can I set the caption on an editor window in Visual Studio
I have implemented an annotate function in the Visual Studio Extension AnkhSVN2019 using a custom margin on an editor window.我在 Visual Studio 扩展 AnkhSVN2019 中使用编辑器窗口上的自定义边距实现了一个注释功能。
In the current version, the tab on the editor window just contains the filename, and looks identical to a normal editor window.在当前版本中,编辑器窗口上的选项卡仅包含文件名,看起来与普通编辑器窗口相同。 I would like to modify the caption, for example by appending the word "Annotated".
我想修改标题,例如通过附加“注释”一词。
I am opening the editor window with我正在打开编辑器窗口
dte.ItemOperations.OpenFile
In the margin factory, I get the interface IWpfTextViewHost.在保证金工厂中,我得到了接口 IWpfTextViewHost。
How can I modify the caption in the tab?如何修改选项卡中的标题?
You can implement your own Microsoft.VisualStudio.PlatformUI.Shell.ViewElementFactory
from <VS installation>\\Common7\\IDE\\Microsoft.VisualStudio.Shell.ViewManager.dll
to overide the tab appearance ie showing the caption as you wish.您可以从
<VS installation>\\Common7\\IDE\\Microsoft.VisualStudio.Shell.ViewManager.dll
实现自己的Microsoft.VisualStudio.PlatformUI.Shell.ViewElementFactory
以覆盖选项卡外观,即根据需要显示标题。
Look at VSTabPath extension code for inspiration.查看VSTabPath扩展代码以获得灵感。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.