Sam Plus Plus
Sam Plus Plus

Reputation: 4591

Visual Studio shortcut key to WFC service code behind

I am currently working in Visual Studio 2013 Update 4 in a WebForms project. For every file the shortcut key F7 will bring me to the files code behind.

However for a WFC service or .svc file that looks like:

<%@ ServiceHost Language="C#" Debug="true" Service="XXX.Web.Svc.XXX" CodeBehind="XXX.svc.cs" %>

F7 does not appear to work. I have also test on a brand new project and it exhibits the same behavior.

I love my keyboard shortcuts, and I was wondering if anyone knew of one to for this, or how to set one?

I apologize in advance if this is not a question for StackOverflow, I did see other questions for Visual Studio shortcuts on here as well as a Visual Studio tag.

Upvotes: 1

Views: 241

Answers (1)

Matt
Matt

Reputation: 1240

When right-clicking on the .svc file and selecting "View Markup", this will bring you to the actual .svc file instead of the .svc.cs. Knowing this, you can go into Tools -> Options -> Environment -> Keyboard, then search for "View.ViewMarkup" and assign a shortcut there.

More information can be found in a previous Stack Overflow question:

What is the shorcut in visual studio to switch from code behind to Xaml Code?

Upvotes: 1

Related Questions