bao-qian
2015-11-29 08:20:13 +00:00
parent 5b8fa5ec8d
commit 7b386c4f41
2 changed files with 7 additions and 17 deletions

View File

@@ -59,16 +59,11 @@ namespace Wox.Core.Theme
UserSettingStorage.Instance.Save();
ResourceMerger.UpdateResource(this);
try
{
var isBlur = Application.Current.FindResource("ThemeBlurEnabled");
if (isBlur is bool)
{
SetBlurForWindow(Application.Current.MainWindow, (bool)isBlur);
}
}
catch (ResourceReferenceKeyNotFoundException e)
// Exception of FindResource can't be cathed if global exception handle is set
var isBlur = Application.Current.TryFindResource("ThemeBlurEnabled");
if (isBlur is bool)
{
SetBlurForWindow(Application.Current.MainWindow, (bool)isBlur);
}
}