Reloading will definitely cause a problem.
According to MS docs:
"Only one instance of the Application class can be created per
AppDomain, to ensure shared access to a single set of application-
scope window, property, and resource data. Consequently, the default
constructor of the Application class detects whether the instance
being initialized is the first instance in an AppDomain; if it is not,
an InvalidOperationException is thrown.
"The Application object for the current AppDomain is exposed from the
static Current property."
Thus:
(import 'System.Reflection.Assembly)
(Assembly/LoadWithPartialName "PresentationFramework")
(import 'System.Windows.Application)
Application/Current ;=> nil
(Application.) ;=> #<Application
System.Windows.Application>
Application/Current ;=> #<Application System.Windows.Application>
(Application.)
InvalidOperationException Cannot create more than one
System.Windows.Application instance in the same AppDomain.
System.Windows.Application..ctor (:0)
I don't know why you'd need the app atom since you can just use
Application/Current. Similarly, you could check Application/Current
before doing (Application.)
I suppose if you really wanted to get fancy, you could create the WPF
application in other AppDomain and then wipe it. Not sure why.
NB: I've not done any WPF work, just working from general principles.
-David
On Apr 13, 6:48 am, kjeldahl <
mariusauto-googlegro...@kjeldahl.net>
wrote: