View previous topic :: View next topic |
Author |
Message |
jakubbukaj
Joined: 07 Mar 2013 Posts: 8
|
Posted: Thu Mar 07, 2013 6:00 am Post subject: Change in resource file is not reflect by designer |
|
|
Hi,
I have MainWindow with invariant resources in MainWindow.resx.
In XAML there is:
Code: |
Label x:Name="_lblJmeno" Content="{Resx _lblJmeno_Content}" Margin ='37,32,0,0'
|
If I change value for _lblJmeno_Content in resources it is not reflected by designer. Rebuild and restart of Visual Studio is needed. Is there any way how to avoid restart and potentially even rebuild to see change in resources in designer?
Thanks,
VS2012 Prof, WPF project, Win 7 64bit |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Mar 08, 2013 8:12 am Post subject: |
|
|
This is almost certainly due to a bug in the Visual Studio 2012 designer process (XDesProc). It does not reload the shadow copied application assembly when it is rebuilt. It is possible to work around this by adding a prebuild event to your project that first kills the XDesProc process (forcing it to be reloaded) using taskkill eg
Code: | taskkill /F /IM XDesProc.exe |
_________________ Infralution Support |
|
Back to top |
|
|
jakubbukaj
Joined: 07 Mar 2013 Posts: 8
|
Posted: Fri Mar 08, 2013 9:42 am Post subject: |
|
|
Hello,
There is one issue with your workaround.
When code is recompiled there is an exception shown instead of redrawn form:
Quote: | An unhandled exception has occurred
Click here to reload designer
Details:
System.Runtime.Remoting.RemotingException
[6072] Designer process terminated unexpectedly! |
Is there some better workaround? Or do you know whether this "bug" is going to be fixed by Microsoft in near future ?
Thanks |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Mar 08, 2013 9:56 am Post subject: |
|
|
The error only happens if you have the design open when you recompile and even then if you click on the "Reload Designer" link it will reload properly. I don't know of a better workaround. You would have to ask Microsoft about any bug fix. _________________ Infralution Support |
|
Back to top |
|
|
|