Skip to content

Commit d38f0fc

Browse files
authored
Fix close button misalignment in WindowChrome (#698)
1 parent 53542eb commit d38f0fc

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

Sample Applications/WPFGallery/MainWindow.xaml.cs

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
using Microsoft.Win32;
2-
using System.Windows.Documents;
1+
using System.Windows.Automation;
2+
using System.Windows.Automation.Peers;
3+
using System.Windows.Controls.Primitives;
34
using System.Windows.Navigation;
4-
using System.Windows.Shapes;
55
using System.Windows.Shell;
6+
using Microsoft.Win32;
7+
using WPFGallery.Helpers;
8+
using WPFGallery.Models;
69
using WPFGallery.Navigation;
710
using WPFGallery.ViewModels;
8-
using WPFGallery.Models;
911
using WPFGallery.Views;
10-
using System.Windows.Automation.Peers;
11-
using System.Windows.Automation;
12-
using WPFGallery.Controls;
13-
using System.Windows.Controls.Primitives;
14-
using WPFGallery.Helpers;
1512

1613
namespace WPFGallery;
1714

@@ -43,7 +40,8 @@ public MainWindow(MainWindowViewModel viewModel, IServiceProvider serviceProvide
4340
CornerRadius = default,
4441
GlassFrameThickness = new Thickness(-1),
4542
ResizeBorderThickness = ResizeMode == ResizeMode.NoResize ? default : new Thickness(4),
46-
UseAeroCaptionButtons = true
43+
UseAeroCaptionButtons = true,
44+
NonClientFrameEdges = NonClientFrameEdges.Right | NonClientFrameEdges.Bottom | NonClientFrameEdges.Left
4745
}
4846
);
4947

0 commit comments

Comments
 (0)