I am using a slightly modified version of this library in my source code (as a source project), however I have not modified any of the loading code.
In my app's App.xaml I add a merged dictionary with some styles and converters I like to use all over:
I use relative paths, because it seems simpler to me to do it this way rather than the rather complicated absolute uri path.
When I call SetColorTheme(), the application crashes when it's trying to enumerate the resource dictionaries.
ResourceLocator.SetColorScheme(Application.Current.Resources, Settings.DarkTheme ? ResourceLocator.DarkColorScheme : ResourceLocator.LightColorScheme);
Looking at the exception and the code involved, it is because it does not check if it is an absolute or relative URI before it tries to resolve an absolute URI.
This PR adds a check for this to prevent an exception. My code no longer throws an exception and everything works as it should.
I am using a slightly modified version of this library in my source code (as a source project), however I have not modified any of the loading code.
In my app's App.xaml I add a merged dictionary with some styles and converters I like to use all over:
I use relative paths, because it seems simpler to me to do it this way rather than the rather complicated absolute uri path.
When I call SetColorTheme(), the application crashes when it's trying to enumerate the resource dictionaries.
ResourceLocator.SetColorScheme(Application.Current.Resources, Settings.DarkTheme ? ResourceLocator.DarkColorScheme : ResourceLocator.LightColorScheme);
Looking at the exception and the code involved, it is because it does not check if it is an absolute or relative URI before it tries to resolve an absolute URI.
This PR adds a check for this to prevent an exception. My code no longer throws an exception and everything works as it should.