project-system icon indicating copy to clipboard operation
project-system copied to clipboard

"View code" / "View designer" workflow for project files

Open vegardlarsen opened this issue 7 years ago • 5 comments

As David Wengier announced on Twitter, VS 2019 preview 2 supports previewing project files when selecting them in Solution Explorer. A natural extension of this would be to support navigation from the code to the Properties view and back, akin to the traditional CodeBehind navigation from code to designer and back; where you can right-click and "View code" in the designer and "View designer" from the code.

It would be extra helpful if the keyboard shortcuts F7 and Shift+F7 worked here as well.

@davidwengier @davkean

vegardlarsen avatar Nov 07 '18 08:11 vegardlarsen

I know @davidwengier took a look at this already, but I can't remember what the outcome of it was.

Pilchie avatar Nov 07 '18 16:11 Pilchie

I looked into making the official "View Code" and "View Designer" menu items work for project files to enable the keyboard shortcuts in #3968 but is far from simple. A right-click menu option might be more possible, but there might be some issues with that too. For example if I'm on the Debug tab of the app designer then View Code should logically open launchSettings.json and not the project file.

davidwengier avatar Nov 08 '18 01:11 davidwengier

Let's leave this, and we'll reconsider once people have had a chance to play with the double click behavior for a while.

Pilchie avatar Nov 08 '18 17:11 Pilchie

Note, this is different from the View Code/View Designer menu items on the context menu in Solution Explorer which is what we looked at. That was much more challenging than this.

davkean avatar Nov 09 '18 03:11 davkean

Note to self: Look at Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.Commands.DefaultStandardCommandSet97Handler, which currently uses the File scoped DocumentManager, but maybe can use the ProjectFile scoped one too?

davidwengier avatar Dec 11 '18 23:12 davidwengier