问题描述
在Visual Studio中,您可以在不使用区域的情况下展开和折叠代码,例如,在代码隐藏页面中可以折叠方法等.在ASPX页面中,您可以折叠标签,标签等.
In Visual Studio, you can expand and collapse code without using regions, for example in a code-behind page you can collapse methods, etc... And in an ASPX page you can collapse tags, tags, etc...
当页面较长且希望将开发重点放在特定部分时,这很有用.它也很酷,那就是您可以关闭文件并重新打开它,并且展开/折叠的块的状态将完全保留在您离开时的状态.
It's useful when you have a long page and you want to focus your development on a specific part. What's cool about it too is that you can close the file and reopen it and the state of the expanded/collapsed blocks is saved exactly as you left it.
一个实例除外.该状态不会保存在ASPX页面中的标记中,这将是最有用的.
我知道有一些不错的VS插件,但找不到能解决此问题的插件.
I know there are some good plugins out there for VS but I couldn't find one that addresses this issue.
有人解决吗?
在您提到自定义控件之前,当试图使页面简短时,它们并不总是方便或可行的,我不认为这是解决此问题的方法.
Before you mention custom controls, they are not always convenient or feasible when trying to keep a page short and I don't consider this a solution to this problem.
推荐答案
目前看来此问题仍未解决.
Looks like this issue will stay unresolved at this time.
我在Microsoft Connect上打开了一个错误报告,如果这个问题对您很重要,请投票!
I opened a bug report on Microsoft Connect, if this issue is important to you please vote it up!
这篇关于关闭文件后未保存展开/折叠状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!