Is there a way in WPF where I can remove the main window's border, yet allow that window to be resized (without grip)?
I realized there's a way to do this scenario by setting resize mode to CanResizeWithGrip
. However, I want to be able to do it with the resize mode set to CanResize
.
I tried setting the following:
ResizeMode="CanResize"
WindowStyle="None"
AllowsTransparency="True"
However, by setting AllowsTransparency
, it removes the ability to resize without the grip. Any ideas how I can pull this off?
I also should note that I can't set AllowsTransparency
to true anyway, because I am using a winformshost control in my window, which is not shown when AllowsTransparency
is true.
Best Answer
I know this is an old question, but I just wanted to put up a working sample for newcomers.
Xaml Window:
C# code behind: