Fix for black UI glitch

This commit is contained in:
Niels Laute 2020-11-13 18:38:13 +01:00
parent 95dc2f79a6
commit 927d78cc04
2 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,7 @@
xmlns:p="clr-namespace:ImageResizer.Properties"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019"
ContentRendered="WindowContentRendered"
MinWidth="560"
MinHeight="340"
ui:WindowHelper.UseModernWindowStyle="True"

View File

@ -25,5 +25,11 @@ namespace ImageResizer.Views
Process.Start(e.Uri.ToString());
e.Handled = true;
}
// Fix for black outline WPF bug when a window uses custom chrome. More info here https://stackoverflow.com/questions/29207331/wpf-window-with-custom-chrome-has-unwanted-outline-on-right-and-bottom
private void WindowContentRendered(object sender, System.EventArgs e)
{
InvalidateVisual();
}
}
}