Describe the bug
Title:
[Segmented] Left arrow key not propagating to parent when at leftmost item
Description:
When the focus is on the leftmost SegmentedItem in a Segmented control and the left arrow key (←) is pressed, the key event is consumed by the control instead of being propagated to the parent for XY focus navigation.
Current Behavior:
- Right arrow (→): Works correctly - when at the rightmost item, the key is NOT consumed and propagates to parent
- Left arrow (←): Does NOT work - when at the leftmost item, the key IS consumed and does NOT propagate to parent
Expected Behavior:
Both left and right arrow keys should behave symmetrically:
- When at the boundary, the key event should be propagated to the parent for XY focus navigation
- This allows focus to move to adjacent
Segmented controls in parent containers
Root Cause:
In Segmented.cs, the MoveFocus(MoveDirection direction) method has asymmetric behavior:
The Bug:
- When at the left boundary,
retVal = true is set, which means the key is marked as "handled"
- When at the right boundary,
retVal is not modified (remains false), meaning the key is NOT marked as "handled"
- This asymmetry breaks XY focus navigation with multiple
Segmented controls
Fix:
Remove the else { retVal = true; } block in the Previous direction case, or add equivalent handling for the Next direction:
Steps to reproduce
When the focus is on the leftmost `SegmentedItem` in a `Segmented` control and the left arrow key (←) is pressed, the key event is consumed by the control instead of being propagated to the parent for XY focus navigation.
Expected behavior
左右の矢印キーは対称的に動作すべきです:
- 境界位置では、XYフォーカスナビゲーションのためキーイベントを親に伝播する
- これにより、親コンテナ内の隣接する
Segmentedコントロールへフォーカスが移動可能となる
Screenshots
No response
Code Platform
Windows Build Number
Other Windows Build number
Windows11 25H2
App minimum and target SDK version
Other SDK version
10.0.17763.0
Visual Studio Version
Preview
Visual Studio Build Number
Visual Studio 2026
Device form factor
Desktop
Additional context
No response
Help us help you
No, I'm unable to contribute a solution.
Describe the bug
Title:
[Segmented] Left arrow key not propagating to parent when at leftmost item
Description:
When the focus is on the leftmost
SegmentedItemin aSegmentedcontrol and the left arrow key (←) is pressed, the key event is consumed by the control instead of being propagated to the parent for XY focus navigation.Current Behavior:
Expected Behavior:
Both left and right arrow keys should behave symmetrically:
Segmentedcontrols in parent containersRoot Cause:
In
Segmented.cs, theMoveFocus(MoveDirection direction)method has asymmetric behavior:The Bug:
retVal = trueis set, which means the key is marked as "handled"retValis not modified (remainsfalse), meaning the key is NOT marked as "handled"SegmentedcontrolsFix:
Remove the
else { retVal = true; }block in thePreviousdirection case, or add equivalent handling for theNextdirection:Steps to reproduce
Expected behavior
左右の矢印キーは対称的に動作すべきです:
Segmentedコントロールへフォーカスが移動可能となるScreenshots
No response
Code Platform
Windows Build Number
Other Windows Build number
Windows11 25H2
App minimum and target SDK version
Other SDK version
10.0.17763.0
Visual Studio Version
Preview
Visual Studio Build Number
Visual Studio 2026
Device form factor
Desktop
Additional context
No response
Help us help you
No, I'm unable to contribute a solution.