Is your feature request related to a problem? Please describe
If the Application.Current is null the Wpf.Ui library does not work, too many Application.Current are hard coded.
This problem is related to #662 and #668
Describe the solution you'd like
A way to use the Wpf.Ui library even if the Application.Current is null.
Describe alternatives you've considered
I was experimenting with version 2.2.0 a way to fix the problem by swapping all the Application.Current to a custom class UiApplication.Current to manage the Resources from the Application.Current if not null or return the Resources from a static internal ResourceDictionary.
This approach gonna ensure that all the current implementations stay the same. The alternative ResourceDictionary gonna be used if the Application is null.
Here is a full repo with that implementation: https://github.com/ricaun/wpfui/tree/2.2.0-uiapplication
I created the project Wpf.Ui.SimpleConsoleDemo with a working implementation when Application.Current is null.
Additional context
Before creating a PR, I would like to discuss whether that approach makes sense to implement in the main library.
Is your feature request related to a problem? Please describe
If the
Application.Currentis null theWpf.Uilibrary does not work, too manyApplication.Currentare hard coded.This problem is related to #662 and #668
Describe the solution you'd like
A way to use the
Wpf.Uilibrary even if theApplication.Currentis null.Describe alternatives you've considered
I was experimenting with version 2.2.0 a way to fix the problem by swapping all the
Application.Currentto a custom classUiApplication.Currentto manage the Resources from theApplication.Currentif not null or return the Resources from a static internalResourceDictionary.This approach gonna ensure that all the current implementations stay the same. The alternative
ResourceDictionarygonna be used if the Application is null.Here is a full repo with that implementation: https://github.com/ricaun/wpfui/tree/2.2.0-uiapplication
I created the project
Wpf.Ui.SimpleConsoleDemowith a working implementation whenApplication.Currentis null.Additional context
Before creating a PR, I would like to discuss whether that approach makes sense to implement in the main library.