Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 921
Plain Coder Avatar asked Dec 15 '13 05:12

Plain Coder


People also ask

How do I view XAML design in Visual Studio?

To open the XAML Designer, right-click a XAML file in Solution Explorer and choose View Designer. to switch which window appears on top: either the artboard or the XAML editor.

How do I disable XAML designer?

You can disable the XAML designer using the Options dialog box. To do so, open the dialog by selecting the Options item from the Tools menu. Once visible, expand the "Text Editor" section, then the "XAML" section at the left of the dialog box. Select "Miscellaneous" to show the correct options.

What is XAML in Visual Studio?

Applies to: Visual Studio Visual Studio for Mac Visual Studio Code. Extensible Application Markup Language (XAML) is a declarative language that's based on XML. XAML is used extensively in the following types of applications to build user interfaces: Windows Presentation Foundation (WPF) apps.

How do I comment out XAML code?

You can add comments to the XAML code that's in the MainWindow. xaml tab in the following ways: Enter <! -- before a comment and then add --> after the comment.


1 Answers

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.

like image 168
puttu Avatar answered Sep 23 '22 20:09

puttu