Fixes#246 (and upstream #1793) where an hc:Window initialized with WindowState="Maximized" could not be resized and lacked resize cursor affordances after being restored to Normal.
Root Cause
When WindowState == WindowState.Maximized at load time, OnLoaded sets chrome.ResizeBorderThickness = new Thickness(0) to prevent edge stretching while maximized.
When the window is subsequently restored (via window restore buttons, snap layouts, Win32 SC_RESTORE, or title-bar drag), OnStateChanged updated BorderThickness and NonClientAreaHeight, but never restored WindowChrome.ResizeBorderThickness.
Furthermore, OnPropertyChanged is not reliably called by WPF during Win32-initiated state changes (e.g., system commands or snap gestures), leaving ResizeBorderThickness stuck at 0.
Solution
In Window.cs, invoked ApplyWindowChrome(WindowState) inside OnStateChanged(EventArgs e) so that every transition back to WindowState.Normal dynamically re-applies the proper resize border thickness (6px) or clears it if Maximized / NoResize.
In Window!.cs, ensured ResizeMode == ResizeMode.NoResize is explicitly honored when calculating chrome.ResizeBorderThickness.
Verification
Built HandyControl_Net_GE45.csproj targeting net8.0-windows cleanly with 0 compilation errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #246 (and upstream #1793) where an hc:Window initialized with WindowState="Maximized" could not be resized and lacked resize cursor affordances after being restored to Normal.
Root Cause
Solution
Verification