Minor changes to the ThemeManager. DetectAppStyle(window) tries to check...

Minor changes to the ThemeManager. DetectAppStyle(window) tries to check Application.Current.Resources for the AppStyle too. Fixes #1232