Open ludelues opened 1 month ago
Nuget = ModernWpfUI
Have you tried setting Window.ResizeMode
to CanResizeWithGrip
? It should add a resizing area to the bottom right of the window.
@ludelues does the above workaround resolves your issue?
I want it to be resizable in all directions, and it currently works, but the area is too narrow.
CanResizeWithGrip is an option that allows resizing only from the bottom-right corner. Did you not know that when you answered?
I think this question better belongs to https://github.com/Kinnara/ModernWpf repo, because window resizing seems to be affected by it.
As far as I can see using ui:WindowHelper.UseModernWindowStyle="True"
overrides the default style for a Window
and applies WindowChrome
to the that window, which then handles the resizing regions for the window.
As a quick fix, could you try to wire up a Loaded
event handler for the window and do something like this?
private void WindowOnLoaded(object? sender, EventArgs e)
{
WindowChrome.GetWindowChrome((Window)sender).ResizeBorderThickness = new Thickness(10);
}
WebView is in front of the WPF window, so it is not applied.
I hope Microsoft resolves this.
It would have helped if you included a repro project as requested.
Description
I can create a perfect application using a WPF and Blazor hybrid, but there is one drawback:
The resize area of the WPF window is too narrow. While adding padding can make it wider, it makes the window look unattractive.
Reproduction Steps
<Window x:Class="MyTalk.WpfPages.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:MyTalk" xmlns:pages="clr-namespace:MyTalk.Pages" mc:Ignorable="d"
Expected behavior
The resize area of the WPF window should be sufficiently wide to allow easy resizing without requiring additional padding. This would enable users to resize the window effortlessly while maintaining the window's aesthetic appearance.
Actual behavior
The resize area of the WPF window is too narrow, making it difficult to resize the window without precise cursor placement. Users often struggle to adjust the window size because the cursor needs to be exactly on the edge to initiate the resize action. This results in a frustrating user experience, as the limited resize area hampers the usability of the application.
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response