How do I resize code editor window programmatically with a Visual Studio extension?

馋奶兔 提交于 2021-01-28 05:43:52

问题


I really like how Visual Studio Code snaps and resizes split editor windows. Since I couldn't find anything similar in its bigger brother Visual Studio 2017, I'm trying to write a simple extension to achieve the same result.

Using the "Editor View Adornment" boilerplate I discovered that I can access the code editor window, in form of a IWpfTextView; however, this interface does not offer any setter for its positioning and size.


回答1:


If you mean snap and resize split editor windows in Visual Studio Code like this:

It is supported by VS2017, click "Window\New Vertical Tab Group" option:

You'll get the code editor splited like this:



来源:https://stackoverflow.com/questions/43275090/how-do-i-resize-code-editor-window-programmatically-with-a-visual-studio-extensi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!