Can I separate the Design Pane from the XAML Pane in Visual Studio?

Plain Coder picture Plain Coder · Dec 15, 2013 · Viewed 19.2k times · Source

Is it possible to separate the WPF window I'm designing from its XAML code? Double clicking any XAML file will open it and show both the XAML code and the WPF window in one window, splitting them either horizontally or vertically, but still both are in one window. I've got 4 monitors, and the XAML code I write has long lines, so I'd like to edit the XAML code on one monitor alone and view the WPF window on another, but splitting them into two different windows doesn't seem possible.

A couple lousy workarounds which I can do but I don't like are:

  1. Undock the whole XAML editor with the designer, then resize that window over two monitors so that the XAML code will be on one monitor and the WPF window on another.
  2. Use "Open With..." to open a second editor of the same XAML document, but then the code highlighting and the WPF window highlighting are not synchronized.

So is it possible to split them? Or maybe you have a better workaround than mine?

Answer

puttu picture puttu · Jul 3, 2014

I had this same problem, then i found a way to separate it like this,

  • Right click on the XAML file in the solution explorer and select Open With;
  • select Source Code (Text) Editor (instead of XML (Text) editor).

This creates a separate tab for the XAML source editor, just undock it and create a new window.