tags:

views:

262

answers:

2

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?

A: 

Try setting AllowsTransparency to True on the Window.

John Myczek
This for the tip. That's not the answer though as AllowTransparency=true disables resizing.
tom greene
Yes, you lose resizing from the window edges, but you can still resize with the grip. You can handle resizing from the wnidow edges yourself, if you are interested I can post the code.
John Myczek
+2  A: 

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" >
Jon Galloway
That looks like a cool project. I'd never heard of it before.
Bryan Anderson
Thanks for the pointer. This library is indeed pretty cool.
tom greene