Skip to content

Conversation

@Avid29
Copy link
Contributor

@Avid29 Avid29 commented Jan 7, 2026

Fixes #813 and #814

PR Type

What kind of change does this PR introduce?

Bugfix

What is the current behavior?

  1. A SegmentedItem container's VisualState will not be updated until the parent Segmented control's Orientation property is updated. This results in the selected indicator showing incorrectly when items are added.

  2. Left/Right arrow keys are inverted in RTL and Up/Down keys aren't handled

What is the new behavior?

  1. SegmentedItem containers are updated to match the Segmented control's VisualState when preparing the container for items.

  2. Left/Right arrow keys adjust the index properly and Up/Down keys are explicitly handled

PR Checklist

Please check if your PR fulfills the following requirements:

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs(https://github.com/CommunityToolkit/WindowsCommunityToolkit-design-assets)
  • Tests for the changes have been added (if applicable)
  • Header has been added to all new source files
  • Contains NO breaking changes

Other information

@Arlodotexe Arlodotexe added bug Something isn't working components::controls::segmented A common UI control to configure a view or setting. preview Used to track feature Issues/PRs to include in the next preview release labels Jan 7, 2026
Copy link
Member

@Arlodotexe Arlodotexe left a comment

Choose a reason for hiding this comment

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

Great improvements! I don't see any logical differences between the old code and the new, except for the fixes and cleanup. Approved 🚀

@Arlodotexe Arlodotexe merged commit b97f909 into CommunityToolkit:main Jan 9, 2026
77 of 80 checks passed
@Avid29 Avid29 deleted the fix_segmented branch January 9, 2026 21:52
@Avid29 Avid29 restored the fix_segmented branch January 11, 2026 10:18
@Avid29 Avid29 deleted the fix_segmented branch January 11, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working components::controls::segmented A common UI control to configure a view or setting. preview Used to track feature Issues/PRs to include in the next preview release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] SegmentedItem Orientation VisualState not updated until Segmented Orientation property changes

2 participants