I've just installed VS 2022 preview to use Maui but there seems no way to see a designer view of the XAML, I want to drag and drop controls onto the page but all I get is an ancient looking XAML text view.
Visual Studio has removed the XAML designer. For now, there is no official plan to readd it.
But Visual Studio support Hot Reload to modify your apps managed source code while the application is running, without the need to manually pause or hit a breakpoint. You could preview the view at runtime when you change the UI. For more details, please check the blog. https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload/
Like Cfun said, you could use live visual tree
as well. It shows a tree view of the UI elements of your running Xamarin.Forms application. https://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/live-visual-tree
For a WPF dotnet6 project, the XAML designer can be enabled here:
Don't know why it's disabled by default.
I had Resharper extension installed, and the Performance Guide for Resharper had enabled an option where it disables Xaml Designer. What i did to fix it: Extensions->Resharper->Options: Enviroment->Performance Guide: Visual Studio preferences affecting performance: Disable XAML designer: Set it to ignore.
Apply and Save these options, then go to Tools-Options: XAML Designer and check Enable XAML Designer (requires restart of Visual Studio).
also set other options here to your liking, then click ok, and restart visual studio. after restart you should now have the XAML Designer.
I have tested on WPF .Net8 VS version 17.9.5
This is the best I can figure out:
- Run the code
- Debug > Windows > Live Visual Tree
- Right-click
<App>
(for example) > View Source - View > Toolbox
- Drag a control from the Toolbox on to the source code
- Monitor how it looks in either:
- Hot Reload (in the running code)
- Debug > Windows > XAML Live Preview
Update: This worked for me one single time whilst writing this answer: I was able to drag a slider control on to the XAML and I saw it immediately update in Hot Reload... but now my Toolbox says "No usable controls in this group" whenever the code is running :(
I'll leave this answer here in case it helps anyone else.
© 2022 - 2025 — McMap. All rights reserved.