diff --git a/src/modules/imageresizer/ui/Views/AdvancedWindow.xaml b/src/modules/imageresizer/ui/Views/AdvancedWindow.xaml index 043a7a72ce..d43c40b1e7 100644 --- a/src/modules/imageresizer/ui/Views/AdvancedWindow.xaml +++ b/src/modules/imageresizer/ui/Views/AdvancedWindow.xaml @@ -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" diff --git a/src/modules/imageresizer/ui/Views/AdvancedWindow.xaml.cs b/src/modules/imageresizer/ui/Views/AdvancedWindow.xaml.cs index a514aa1b5e..30b398813f 100644 --- a/src/modules/imageresizer/ui/Views/AdvancedWindow.xaml.cs +++ b/src/modules/imageresizer/ui/Views/AdvancedWindow.xaml.cs @@ -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(); + } } }