views:

228

answers:

1

In Visual Studio: When you right-click on a xoml file in the solution explorer and select "View Code" it takes you to the designer (design view).

Steps to Reproduce

  • create a xoml
  • add something into the code-behind [I used C#]
  • Close the code-behind and designer
  • right-click the xoml from the Solution Explorer
  • Select "View Code"

Actual Results

  • Designer view is opened.

Expected Results

  • Code view should open.
A: 

I found this question elsewhere, unanswered, so here's the solution/workaround I discovered.

  • right-click on a xoml file in Solution Explorer.
  • select "Open With..."
  • select "Xml Editor"
  • click "Set as Default"
  • click "OK"

You should now be able to view the code.

NOTE:
Different settings for the default opener have odly (stupidly?) different behaviors. On my VS2008 with .NET 3.5 SP1:
Workflow Designer: only allows designer view.
XML Editor: only allows code view.
Source Code (Text) Editor: defaults to designer view, but allows code view.