xamlvisual-studio-code

How do you open xaml files in vscode?


I created a new WPF application using the command dotnet new wpf in the Terminal. I now have two xaml files, App.xaml and MainWindow.xaml, how do I open these files, everytime i select them they just take me to the code.


Solution

  • XAML files are XML files. They are being opened by Visual Studio Code just fine.

    It sounds like what you are interested in, though, is working with XAML files via the XAML Designer, where you can drag and drop controls onto a design surface?

    Unfortunately, Visual Studio Code does not provide a XAML designer out of the box. There are third-party tools you can use, but if you need XAML Designer support my suggestion would be to download and use Visual Studio (rather than Visual Studio Code). The Community Edition of Visual Studio is free to use.