How to manually reload the Visual Studio designer for WPF

dthrasher picture dthrasher · Sep 16, 2010 · Viewed 25.5k times · Source

Is there any way to force the WPF designer to reload or refresh, without rebuilding the entire project or solution?

If there's an error, I get an option in the designer view to refresh the designer. But if I don't have an error, how can I get the designer to refresh after I've made a change?

Answer

MasterMastic picture MasterMastic · Aug 6, 2013

I'm a little late but this is the best solution1 I've found so far: whenever the designer does stupid stuff, I just kill it's process.

Press Ctrl+Shift+Esc
Navigate to the Processes tab.
Kill XDesProc.exe

This also fixes issues for the properties window (like when it gets jammed and you can't type stuff into it).

1 This is a solution for designer issues. Your issues may also be caused by compilation problems, in which case just right click on the solution in the solution explorer, and clean it. The reason behind it is that sometimes the compilation loses synchronicity with the generated files from XAML, and cleaning the solution just deletes those intermediate files; it's like a reset so your compilation can start off with a clean slate.


To do it fast:

Comfortably it's usually the last one if sorted alphabetically.
When it is, it's almost like a ritual for me to quickly pop up the task manager, click any process, press End, Delete, Enter (done), Esc (exit task manager). Instead of restarting VS and waiting for all the loads & unloads, you can do that in 1-2 seconds.