6

For a simple WPF window, is it possible to increase the area where the mouse can resize the window? For example:

Trial

The border is too thin. I tried the following workarounds but only the edge part of the window acts as an area for resizing:

  1. Increasing BorderThickness of the window
  2. Setting WS_THICKFRAME
stakx - no longer contributing
  • 83,039
  • 20
  • 168
  • 268
Garmanarnar
  • 105
  • 8

1 Answers1

1

You can set WindowStyle="None" and set borderbrush and borderthickness to achieve what you expect.

<Window x:Class="WpfApplication1.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="100" Width="100" WindowStyle="None" BorderThickness="3" BorderBrush="Black" ResizeMode="CanResizeWithGrip" >
 Hello World
</Window>

Hope it works for you!

Or use Wpf custom window, Windows edge resize feature

Wpf custom window, Windows edge resize feature

Community
  • 1
  • 1
  • Thanks for the answer, but it doesn't seem to increase the area that allows resizing of the whole window. Only the edge seems to allow resizing. See my edited question for details. I think it's possible to use a custom border and just manually set its own mouseDown/mouseMove/mouseUp for the drag behavior. I'll check it out first. – Garmanarnar Mar 28 '17 at 06:41
  • ResizeMode="CanResizeWithGrip" add it. You will get a grip to resize the window as you wish. – Thiyagu Rajendran Mar 28 '17 at 06:43
  • It will increase the area to resize the window. – Thiyagu Rajendran Mar 28 '17 at 06:53
  • Yes, but only the lower right part. The question asks for the whole border area. "**CanResizeWithGrip**. This option has the same functionality as CanResize, but adds a "resize grip" to the lower right corner of the window."" – Garmanarnar Mar 28 '17 at 07:10
  • 1
    Then you may go for custom window edge resize grip. I have updated my answer with a link with a resolution. Check it. – Thiyagu Rajendran Mar 28 '17 at 07:17
  • Windows Edge resize feature actually worked. Thanks for this! – Garmanarnar Mar 28 '17 at 07:29