Apply background effects on ContentRendered
build / build (push) Has been cancelled
build / publish (push) Has been cancelled

This commit is contained in:
ema
2026-04-05 22:43:35 +08:00
parent 98ec2ce4ac
commit 94b56a885a
+7 -6
View File
@@ -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)