Can I enlarge the window area to resize the window with the mouse?

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

Trial

The border is too thin. I tried the following workarounds, but only the extreme part of the window acts as a region for resizing:

+4
source share
1 answer

You can set WindowStyle = "None" and set borderbrush and borderthickness to achieve the expected result.

<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 this works for you!

Or use a custom Wpf window, Windows window resizing function

Wpf, Windows

+1

Source: https://habr.com/ru/post/1673367/


All Articles