jeffwilcox / wp-thememanager

Windows Phone ThemeManager allows for easy overriding of the Dark or Light themes
89 stars 26 forks source link

Do not throw when the theme is not in the MergedDictionaries. #21

Closed jlaanstra closed 10 years ago

jlaanstra commented 10 years ago

This PR fixes an issue where a custom theme is not applied if the ResourceDictionary is not included in the MergedDictionaries section in app.xaml.

The Single() throws if it does not find a single ResourceDictionary with the specified Uri, so FirstOrDefault() would be a better option.

jeffwilcox commented 10 years ago

Awesome work, thank you. I will incorporate and ship the updated NuGet today if I have time at lunch.

jeffwilcox commented 10 years ago

This is published on NuGet.org now: 2.1.1.