-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[Windows] Fix TitleBar color not applied to the Flyout icon background during initial loading #32789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[Windows] Fix TitleBar color not applied to the Flyout icon background during initial loading #32789
Conversation
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a Windows-specific issue where the TitleBar background color was not properly applied to the Flyout icon background during initial loading. The root cause was that ButtonHolderGrid was null during initial template setup. The fix ensures UpdateBackgroundColorForButtons() is called after ApplyTemplate completes, when ButtonHolderGrid is guaranteed to be available.
Key Changes
- Adds a call to
UpdateBackgroundColorForButtons()after template application completes inWindowRootView.cs - Includes UI tests to verify both initial color application and dynamic color changes
- Tests run on Windows and MacCatalyst platforms where TitleBar is supported
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Core/src/Platform/Windows/WindowRootView.cs |
Adds call to UpdateBackgroundColorForButtons() in OnNavigationViewControlOnApplyTemplateFinished to ensure color is applied after template is ready |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue25081.cs |
Adds NUnit UI tests to verify initial and dynamic flyout icon background color application |
src/Controls/tests/TestCases.HostApp/Issues/Issue25081.cs |
Adds Shell-based test page with TitleBar and button to test color changes |
|
|
||
| [Test, Order(1)] | ||
| [Category(UITestCategories.Shell)] | ||
| public async Task VerifyFlyoutIconBackgroundColor() |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test methods should return void instead of async Task when they don't contain any await statements. The async keyword is unnecessary here since no asynchronous operations are being performed.
Change to:
public void VerifyFlyoutIconBackgroundColor()|
|
||
| [Test, Order(2)] | ||
| [Category(UITestCategories.Shell)] | ||
| public async Task VerifyDynamicFlyoutIconBackgroundColor() |
Copilot
AI
Nov 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test methods should return void instead of async Task when they don't contain any await statements. The async keyword is unnecessary here since no asynchronous operations are being performed.
Change to:
public void VerifyDynamicFlyoutIconBackgroundColor()| public async Task VerifyDynamicFlyoutIconBackgroundColor() | |
| public void VerifyDynamicFlyoutIconBackgroundColor() |
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Root Cause of the Issue:
Description of Change
Screenshot
Before-Fix.mp4
After-Fix.mp4
Issues Fixed
Fixes #25081