Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Expanded/collapsed state not saved after closing file

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.

Except in one instance. That state is not saved for tags in ASPX pages, where it would be most useful.

I know there are some good plugins out there for VS but I couldn't find one that addresses this issue.

Has anybody got a solution?

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.

like image 761
md1337 Avatar asked Aug 03 '10 21:08

md1337


People also ask

How do I collapse and expand code in Visual Studio?

Where you see braces or regions in code, you can collapse or expand them with the keyboard shortcut Ctrl + M, P to expand or Ctrl + M, O to collapse.

How do you expand and collapse a code block?

To hide a region of code from view, you can collapse it so that it appears under a plus sign (+) in the text editor. Then, to expand a collapsed region, click the plus sign. If you are a keyboard user, you can choose Ctrl+M+M to collapse and expand.


1 Answers

Looks like this issue will stay unresolved at this time.

I opened a bug report on Microsoft Connect, if this issue is important to you please vote it up!

https://connect.microsoft.com/VisualStudio/feedback/details/613221/expanded-collapsed-state-not-saved-after-closing-file

like image 177
md1337 Avatar answered Oct 13 '22 14:10

md1337