diff --git a/QuickLook/ViewerWindow.xaml.cs b/QuickLook/ViewerWindow.xaml.cs index bb6ff76..d3d09b2 100644 --- a/QuickLook/ViewerWindow.xaml.cs +++ b/QuickLook/ViewerWindow.xaml.cs @@ -158,12 +158,6 @@ public partial class ViewerWindow : Window base.Close(); } - protected override void OnSourceInitialized(EventArgs e) - { - base.OnSourceInitialized(e); - ApplyWindowBackgroundEffects(); - } - public override void OnApplyTemplate() { base.OnApplyTemplate(); @@ -173,6 +167,13 @@ public partial class ViewerWindow : Window ApplyWindowBackgroundEffects(); } + protected override void OnContentRendered(EventArgs e) + { + base.OnContentRendered(e); + + ApplyWindowBackgroundEffects(); + } + private void ApplyWindowBackgroundEffects() { var useTransparency = SettingHelper.Get("UseTransparency", true)