简体   繁体   English

如何在 Visual Studio 的编辑器窗口上设置标题

[英]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.

相关问题 如何在 Visual Studio 编辑器窗口中隐藏或显示自定义边距 - How can I hide or show a custom margin on a visual studio editor window Visual Studio 2019 如何从 Diff 窗口转到同一文件的编辑器 - Visual Studio 2019 how do I go from Diff window to editor of the same file 如何在 visual studio 中打开这个 window? - How do I open this window in visual studio? 在Visual Studio 2019中,如何在按Enter键时配置VB.NET代码编辑器的IntelliSense不插入换行符? - In Visual Studio 2019, how can I configure the VB.NET code editor's IntelliSense not to insert a newline when I press enter? MS Visual Studio 2019:如何更改文本编辑器工具提示 window 的背景颜色 - MS Visual Studio 2019: how to change background color of text editor's tooltip window LogicApps 编辑器和 Visual Studio 2019 怎么样? - LogicApps editor and Visual Studio 2019 how? 如何设置相同的键来切换 Visual Studio 中当前块的折叠? - How can I set the same key to toggle the folding of the current block in Visual Studio? 如何在 Visual Studio Pro 2019 中设置 JSON 文本编辑器选项卡/空格设置? - How do I setup JSON Text Editor Tabs/Spaces settings in Visual Studio Pro 2019? 如何让 Visual Studio 视图编辑器和预编译器使用 C# 7? - How do I get Visual Studio view editor and pre-compiler to use C# 7? 如何在 Visual Studio 2019 中将 WinMerge 设置为合并工具? - How do I set WinMerge as the merge tool in Visual Studio 2019?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM