Skip to content

Conversation

Tamilarasan-Paranthaman
Copy link
Contributor

Root Cause of the issue

  • The TitleColor was used as the foreground color in the DataTemplate applied to the MenuItems. As a result, the color was applied to all items instead of being limited to the items in the NavigationView.

Description of Change

  • I removed the foreground color from the DataTemplate and applied the text color to the menu items in the NavigationView using the NavigationViewItemForeground. This resolved the issue, ensuring that the text color was applied exclusively to the menu items within the NavigationView, without affecting the items in the overflow menu presenter.

Issues Fixed

Fixes #26754

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Screenshot

Before Issue Fix After Issue Fix

WinUI Reference

  • I have attached an image illustrating the behavior of the WinUI platform when applying the foreground color to a NavigationView item. The color was used exclusively for the items in the NavigationView, consistent with the behavior observed on other MAUI-supported platforms, such as Android, macOS, and iOS.
WinUI-NV (1)

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Dec 31, 2024
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 31, 2024
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman marked this pull request as ready for review January 2, 2025 14:20
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman requested a review from a team as a code owner January 2, 2025 14:20
@Redth
Copy link
Member

Redth commented Jan 2, 2025

What does this look like when you change the system theme to dark mode?

@Tamilarasan-Paranthaman
Copy link
Contributor Author

What does this look like when you change the system theme to dark mode?

@Redth, The menu item colors will change to white, similar to the behavior in WinUI, when the system theme is switched to Dark mode. I have attached a video for your reference.

NV-Dark-Mode.mp4

@jfversluis
Copy link
Member

jfversluis commented Jan 8, 2025

/azp run

This comment was marked as outdated.

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis
Copy link
Member

jfversluis commented Jan 16, 2025

The macOS UI Tests for TabbedPage keeps failing so... is something happening here? It seems weird, but want to make sure that this doesn't impact anything else

Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to get @Foda 's thoughts on this one before merging

@Tamilarasan-Paranthaman
Copy link
Contributor Author

The macOS UI Tests for TabbedPage keeps failing so... is something happening here? It seems weird, but want to make sure that this doesn't impact anything else

image

@jfversluis, the UpdatedSelectionIndicatorProperly TabbedPage test appears to have failed due to the absence of a Mac screenshot. This screenshot seems to have already been added in the following PR ⁠#27028

@Mark-NC001
Copy link

I've tried it and yes I can read the menu text now (yay!), but for some reason the text colour for the unselected tab is now black!

image

@Tamilarasan-Paranthaman
Copy link
Contributor Author

I've tried it and yes I can read the menu text now (yay!), but for some reason the text colour for the unselected tab is now black!

image

@Mark-NC001, I am not entirely sure about the use case you mentioned. Based on the provided issue sample, you set the BarTextColor, which is applied to all items in the NavigationView. You can verify this in the image reference in the description (after the issue fix image).

From the given sample, if the BarTextColor is not set, the SelectedTabColor and UnSelectedTabColor will be used. I have already verified that this is working as expected.

Could you please provide more details about the use case you tested for this? I will check it from my end.

@Mark-NC001
Copy link

Could you please provide more details about the use case you tested for this? I will check it from my end.

@Tamilarasan-Paranthaman - I have done a Clean on my project and tried again, and it works fine! Sorry I should have tried that before my last post! Thank you for the fix! :-)

@Foda
Copy link
Member

Foda commented Jan 30, 2025

/rebase

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Feb 26, 2025

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Jul 15, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis
Copy link
Member

/rebase

@Copilot Copilot AI review requested due to automatic review settings August 12, 2025 10:15
Copy link
Contributor

@Copilot 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jfversluis jfversluis changed the base branch from main to inflight/current August 12, 2025 14:49
@jfversluis jfversluis merged commit 7084b9f into dotnet:inflight/current Aug 12, 2025
@jfversluis jfversluis added this to the .NET 9 SR11 milestone Aug 12, 2025
github-actions bot pushed a commit that referenced this pull request Aug 15, 2025
* MenuItem color fix

* Added UI test

* Added snapshots

* Updated Mac snapshot
github-actions bot pushed a commit that referenced this pull request Aug 15, 2025
* MenuItem color fix

* Added UI test

* Added snapshots

* Updated Mac snapshot
github-actions bot pushed a commit that referenced this pull request Aug 19, 2025
* MenuItem color fix

* Added UI test

* Added snapshots

* Updated Mac snapshot
github-actions bot pushed a commit that referenced this pull request Aug 22, 2025
* MenuItem color fix

* Added UI test

* Added snapshots

* Updated Mac snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-tabbedpage TabbedPage community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Menu of TabbedPage's text can be difficult to read
9 participants