How to manually reload Visual Studio Designer for WPF

Is it possible to force the WPF designer to reboot or update without rebuilding the entire project or solution?

If there is an error, I get an option in the constructor view to update the constructor. But if I don't have an error, how can I get the constructor to update after making the changes?

+50
visual-studio wpf xaml designer
Sep 16 '10 at 17:06
source share
9 answers

I'm a little late, but this is the best solution 1 that I have found so far: whenever a designer does stupid things, I just kill him.

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

This also fixes problems for the properties window (for example, when it is stuck and you cannot enter material into it).

1 This is a solution for design problems. Your problems can also be caused by compilation problems, in which case, simply right-click on the solution in the solution explorer and clear it. The reason for this is that sometimes compilation loses synchronization with created files from XAML, and clearing the solution simply removes these intermediate files; it's like reset, so your compilation can start from scratch.




To do this quickly:

Conveniently this is usually the last one, if sorted alphabetically.
When this is the case, it’s almost like a ritual to open the task manager quickly, click on any process, press End , Delete , Enter (done), Esc (exit the task manager). Instead of restarting VS and waiting for all loads and unloads, you can do this in 1-2 seconds.

+31
Aug 6 '13 at 14:03
source share

You can add this to the Tools menu in Visual Studio.

After configuration, use Tools..XAML Designer Restart :

Alt + T then L

enter image description here

enter image description here

I tried setting it up for Alt + T , then X , but this came across Tools..Choose ToolboX Items .

Update

These days, I prefer to just press Ctrl + Shift + Esc to open the process manager, then X to go to XDesProc.exe , then Delete to kill the rogue process (es).

+15
Aug 22 '15 at 18:16
source share

In newer versions of Visual Studio, the Disable Project Code icon is at the bottom of the designer. If you disable this and enable it, it will reload the constructor.

+8
Mar 26 '16 at 1:41
source share

The designer of Visual Studio is trying to keep the visual representation in sync with XAML. This is advertising behavior.

  • The first thing you should check is the absence of errors in the error window. It could be something as simple as a missing angle bracket.
  • Secondly, check to see if you have any code (other than the code) that you need to compile for the designer to correctly display your XAML. This includes any of your own data types that you create in XAML, any user controls you wrote (for example, MyTextBlock, derived from TextBlock), or any classes that directly or indirectly support development-time data. If so, you need to rebuild your project.
  • The last thing to check is possible errors in the designer. Despite the advertised behavior, the designer may exit due to synchronization due to errors. In this case, close the XAML window and open it again. Other tricks that may work are to select the XAML tab and then the Design tab or maximize the XAML area.

As for rebuilding your application, you don't need to do this as a habit. You only need to recompile it when the above conditions apply. Once they are not applied, you can simply change the XAML. Another way of saying this is that if you have not modified the code, you do not need to rebuild (modulo error).

+7
Dec 31 '10 at 5:24
source share

I'm not sure, but I think the assembly will update your view in this situation.

+3
Dec 15 '10 at 4:37
source share

At least theoretically, Design design is always in sync with XAML, so there is no need to constantly update it. May I ask, under what circumstances do you want to restart it?

+1
Nov 06 2018-10-06T00:
source share

There is an event in this XAML file, and in most cases it does not display a design preview from Visual Studio. If you want to see the design from Visual Studio, try using Command Binding instead of an event, you will see a preview.

+1
Dec 30 '10 at 8:07
source share

I'm not sure how this works when editing WPF, but with ASP.NET pages, when the design view is not updated, I can do 2 things

  • Exit Visual Studio and restart
  • Go to the original view (not broken), enter something and delete it (without canceling, just delete or open it) and save it. Then go back to the design view, as a rule, the view has been updated.
0
Dec 30 '10 at 8:44
source share

When you add a new line of code or a new object, the XAML constructor is synchronized, but I came across non-synchronous behavior when changing the property of an object.

The tricky way is that when you change a property, you only need to remove the ">" character from the end of the statement, and then repeat it.

0
Jun 25 '14 at 4:36
source share



All Articles