Skip to content

Conversation

@Tamilarasan-Paranthaman
Copy link
Contributor

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:

  • The NavigationViewControl ButtonHolderGrid color was not properly updated at initial loading. At initial loading the ButtonHolderGrid is null due to this the color was not updated properly.

Description of Change

  • The color is now updated after ApplyTemplate has completed. This ensures that ButtonHolderGrid is no longer null, and the color is now applied correctly during initialization.

Screenshot

Before Fix After Fix
Before-Fix.mp4
After-Fix.mp4

Issues Fixed

Fixes #25081

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Nov 21, 2025
@sheiksyedm sheiksyedm marked this pull request as ready for review November 21, 2025 14:31
Copilot AI review requested due to automatic review settings November 21, 2025 14:31
@sheiksyedm
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copilot finished reviewing on behalf of sheiksyedm November 21, 2025 14:34
Copy link
Contributor

Copilot AI left a 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 in WindowRootView.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()
Copy link

Copilot AI Nov 21, 2025

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()

Copilot uses AI. Check for mistakes.

[Test, Order(2)]
[Category(UITestCategories.Shell)]
public async Task VerifyDynamicFlyoutIconBackgroundColor()
Copy link

Copilot AI Nov 21, 2025

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()
Suggested change
public async Task VerifyDynamicFlyoutIconBackgroundColor()
public void VerifyDynamicFlyoutIconBackgroundColor()

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-titlebar partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The flyout icon and background appear awkward when enabled alongside a TitleBar.

2 participants