Skip to content

fix: Window Title Bar and Maximize Icon Not Updated Correctly When Restoring Maximized State via Code #1453#1466

Merged
pomianowski merged 2 commits intolepoco:mainfrom
Davidlegendre:dev
Oct 25, 2025
Merged

fix: Window Title Bar and Maximize Icon Not Updated Correctly When Restoring Maximized State via Code #1453#1466
pomianowski merged 2 commits intolepoco:mainfrom
Davidlegendre:dev

Conversation

@Davidlegendre
Copy link
Copy Markdown
Contributor

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

Currently, when a window is maximized programmatically (e.g., WindowState = Maximized in code), the title bar may not visually adjust correctly, and the client area does not provide appropriate padding. This results in content overlapping with the system-reserved areas (such as the taskbar or screen edges), and the maximize button may not reflect the correct state.

Issue Number: N/A

What is the new behavior?

  • Title bar now visually updates correctly when the window is maximized via code.
  • Proper padding is applied to the client area, ensuring that UI elements are not hidden or cut off at the edges.
  • The maximize button reflects the correct state, even when maximized programmatically.
  • Changes are encapsulated in ClientAreaBorder.cs for maintainability and clarity.

Other information

This fix ensures consistency between manual and programmatic window maximization. It improves UX for developers who customize their window behavior via code without relying on the user manually clicking the maximize button.

Fix: Title Bar MaxButton When Maximizing Window Programmatically
Update: Improved Client Area Border Handling on Programmatic Maximize
@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. PR Pull request dotnet release titlebar Titlebar updates labels Jun 28, 2025
@kitgrose
Copy link
Copy Markdown

FYI, this PR isn't properly linked to the issue (#1453), because the issue number was used in the title but not in the text.

@pomianowski pomianowski changed the title [Bug] Window Title Bar and Maximize Icon Not Updated Correctly When Restoring Maximized State via Code #1453 fix: Window Title Bar and Maximize Icon Not Updated Correctly When Restoring Maximized State via Code #1453 Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. dotnet PR Pull request release titlebar Titlebar updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Window Title Bar and Maximize Icon Not Updated Correctly When Restoring Maximized State via Code

3 participants