-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application must be instantiated before call to window constructor due to resources in App.xaml #41
Comments
One workaround is of course to define the resources in all XAML files, but that's a horrible solution for obvious reasons. Surely there must be some way to use application-wide resources when using Elmish.WPF? If this is indeed currently impossible, the fix could be as simple as adding a function |
In fact, I see that Elmish.WPF calls |
Closed by #48 |
When using
Program.runWindow
, the window must necessarily be instantiated first. SinceApplication
isn't instantiated before callingrunWindow
, I get the following exception on theInitializeComponent()
call in the window constructor:Exception: Cannot find resource named 'MaterialDesignMultiFloatingActionAccentPopupBox'. Resource names are case sensitive.
This error occurs because the resource in question is defined in my
App.xaml
:Since this is not instantiated/loaded before the window is initialized, I am unable to initialize my main window to start the app.
What is the best way to solve this? Is there something I can do, or must this be fixed in Elmish.WPF?
The text was updated successfully, but these errors were encountered: