When using view code in XOML file, designer view is displayed

In Visual Studio: When you right-click on the xoml file in the solution explorer and select View Code, you will be taken to the designer (design).

Steps to reproduce

  • create xoml
  • add something to the code-behind [i used c #]
  • Close the code and constructor
  • right click on the xoml icon from solution explorer
  • Select "View Code"

Actual results

  • The designer view opens.

Expected results

  • Open the code.
+1


a source to share


1 answer


I found this question elsewhere with no answer, so here is the solution / workaround I found.

  • right click on the 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 different (silly?) Different behaviors. On my VS2008 with .NET 3.5 SP1:
Designer Workflow: Allows the designer to view.
XML Editor: Allows viewing of the code.
Source (text) editor: By default, it uses the designer view, but allows you to view the code.

+1


a source







All Articles