Application.Current changes when using reflection to create an instance of another Application class
Posted
by markti
on Stack Overflow
See other posts from Stack Overflow
or by markti
Published on 2009-06-30T22:32:57Z
Indexed on
2010/04/02
8:03 UTC
Read the original article
Hit count: 178
silverlight-3.0
|Silverlight
Let's say I have the following Silverlight Applications:
- App1.xap
- App2.xap
- App3.xap
Let's say that I start App1.xap as the default xap file. If I load App2.xap and App3.xap and instantiate an Application class within one of the other two XAPs. The Application.Current changes to be that new instance.
System.Windows.Application obj = Activator.CreateInstance(type) as System.Windows.Application;
I don't want the current application to change. I just want to get the merged Resource Dictionaries off the Application class.
© Stack Overflow or respective owner