For some reason, whenever I create a new class by right clicking on a project in the Solution Explorer pane and choosing Add Class or Add New Item (which is a class), the pane to edit the code for the class shares the tab group of Solution Explorer and not the tab group of other code windows I already have open. A picture is worth a thousand words, so have a look at this example:
I just added Menu2.cs to my project and it got opened in Solution Explorer's tab group, instead of the right hand side tab group where other (code/text) files are opened.
Update: Apparently it's worse than I thought. If I double click on any source file in my project that is not currently open, it will also (wrongly) open in the Solution Explorer tab group.
Update 2: (Solution) Undocking and redocking Solution Explorer to the left edge fixed the problem, thanks to the people who answered. You have to choose the far left (or far right) image and not the near left/right one, to avoid this problem:
Sorry for the cut off image, but that was the best I could do to screen capture the fade in icons for pane positioning.
I almost posted this as a comment instead of an answer, as I'm not 100% right now on this;
But it looks to me like Solution Explorer is in a 'normal' document area, and not a sidebar area. New documents, from my experience, open in the left/top most regular document area, hence the behavior you are getting, perhaps?
You might try re-docking Solution Explorer while keeping Menu2.cs open; if I'm right, that will allow you to make sure you have SE docked to a side bar, and that might help.
Going to play with it some myself now, too...
You docked the Solution Explorer as a content window instead of a tool pane.
Therefore, you now have two document panes, one of which contains the Solution explorer.
When you open a new document, it opens in the last focused document pane, which in your case is the one containing the Solution Explorer. (Since you just used it to open the file)
To fix this, undock the Solution Explorer, then re-dock it on the far right.
Then, move any tabs still in the right tab group back to the main tab group.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With