Partager via


Turn off WPF Designer view when opening XAML files

This may not be to everyone's taste, but when I use Visual Studio to edit XAML files I normally want to do it in XAML rather than visually with the designer. By default, every time I open a XAML file it tries to open in the designer view. This is especially annoying when you are trying to demo WPF code to someone.

To open XAML files without design surface:

  1. Open a WPF project
  2. Right-click on one of the .xaml files in the Solution Explorer
  3. Select Open with...
  4. Select XML editor
  5. Click the Set as default button one the right-hand side.

Obviously, this means you can't get to Design view by double-clicking. To do that:

  1. Right-click on one of the .xaml files in the Solution Explorer
  2. Select Open with...
  3. Select WPF Designer (Cider)

It suits my style and may do yours. And as Cider gets better, it will open up XAML files into design view smoother and you can always go back and change this. If there is an option to set Cider to open in XAML rather than Design I would much prefer this but can't find it, chime in if you know...

Comments

  • Anonymous
    January 08, 2007
    I should have thought of this but didn't so many thanks for giving my brain a kick with this very useful tip :-) Phil