When I display a WPF window with WindowStyle="None"
, it looks great when using areo.
However, when I use luna or classic, it displays an ugly gray border about 5 pixels wide.
Of course, if I set ResizeMode="NoResize"
, this border disappears, but I would like the window to be resizable (ResizeMode="CanResize"
).
Other non WPF applications (live mail, ie, firefox, etc.) do not display this gray border, but are still resizable.
Is there a way to remove this border while still being resizable?
To open a new window and have it centred on the screen, set the WindowStartupLocation property to CenterScreen. You can do this using the XAML or in code before the window is displayed. Run the program and click the button to see the result.
Window is the root control that must be used to hold/host other controls (e.g. Button) as container. Page is a control which can be hosted in other container controls like NavigationWindow or Frame. Page control has its own goal to serve like other controls (e.g. Button). Page is to create browser like applications.
I'm using the WPF Customizable Window's Essential Window. Here's my window declaration (abbreviated):
<CustomWindow:EssentialWindow
xmlns:aero="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
xmlns:CustomWindow="clr-namespace:CustomWindow;assembly=CustomWindow"
AllowsTransparency="True" Background="Transparent"
ResizeMode="CanResizeWithGrip"
WindowStyle="None"
ShowInTaskbar="True" >
Try setting AllowsTransparency to True on the Window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With