Skip to content

Conversation

@alexanderboswell
Copy link
Contributor

@alexanderboswell alexanderboswell commented Nov 22, 2025

Platforms Impacted

  • iOS
  • visionOS
  • macOS

Description of changes

In some scenarios, when the ListItem is used inside a navigationLink, the background color is not correct. The issue is the NavigationLink wraps the content of the ListItem, so we need a way to expose out the cell background color to set it correctly for some custom implementation.

Also, ensured we set the background color for the listRow API also, so that we correctly apply color for scenarios in which the ListItem is displayed in a List and when it is not.

Binary change

N/A

Verification

Ensured the color returned from the new API matches the cell background color, making a NavigationLink be colored correctly.

The second row is a navigation link, and the background color is correct along all edges.
image

Pull request checklist

This PR has considered:

  • Light and Dark appearances
  • iOS supported versions (all major versions greater than or equal current target deployment version)
  • VoiceOver and Keyboard Accessibility
  • Internationalization and Right to Left layouts
  • Different resolutions (1x, 2x, 3x)
  • Size classes and window sizes (iPhone vs iPad, notched devices, multitasking, different window sizes, etc)
  • iPad Pointer interaction
  • SwiftUI consumption (validation or new demo scenarios needed)
  • Objective-C exposure (provide it only if needed)
Microsoft Reviewers: Open in CodeFlow

@alexanderboswell alexanderboswell marked this pull request as ready for review November 22, 2025 00:03
@alexanderboswell alexanderboswell requested a review from a team as a code owner November 22, 2025 00:03
@alexanderboswell alexanderboswell enabled auto-merge (squash) November 22, 2025 00:03
@alexanderboswell alexanderboswell merged commit c2e1281 into microsoft:main Nov 25, 2025
17 of 19 checks passed
@alexanderboswell alexanderboswell deleted the user/alboswel/ExposeCellBackgroundColor branch November 25, 2025 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants