tom greene tom greene - 1 month ago 18
C# Question

How can I remove the border of a WPF window when using luna or classic?

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?

Answer

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" >
Comments