WPF: develop on two monitors, separate design editor and xaml code

I found a way to separate it like this:

  • Right click on the XAML file in the solution explorer and select Open With...

    enter image description here

  • select Source Code (Text) Editor

    enter image description here

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


Short: Yes it is possible.


Since Visual Studio 2019 (v16.4):

Pop up XAML editor as a separate window from designer (v16.4):
It is now possible to easily split the XAML Designer and its underlying XAML editor into separate windows using the new Pop up XAML button next to the XAML tab. When clicked the XAML designer will minimize its attached XAML tab and pop open a new window for just the XAML editor view. You can move this new window to any display or tab group in Visual Studio. Note that it is still possible to expand the original XAML view but regardless all XAML views of the same file will stay synchronized in real-time.

PopOut Xaml

Previous Visual Studio 2019 (v16.4):

  1. Open your xaml as normal and collaps the source code using the arrors on the right site of the editor.
    Collapsed Button
  2. Right-Click on your xaml and click Open With
    Open with
  3. Select the Source-Code Editor enter image description here
  4. Move the Tab on the second monitor.