Skip to content

[RangeSelector] Add support for vertical orientation - #756

Merged
Arlodotexe merged 24 commits into
CommunityToolkit:mainfrom
Illustar0:feat/allow-vertical-rangeselector
Feb 10, 2026
Merged

Arlodotexe merged 24 commits into
CommunityToolkit:mainfrom
Illustar0:feat/allow-vertical-rangeselector

Conversation

@Illustar0

@Illustar0 Illustar0 commented Dec 3, 2025 •

Copy link
Copy Markdown
Contributor

Fixes #755 ,Fixes #819

PR Type

What kind of change does this PR introduce?

What is the current behavior?

No vertical orientation support for RangeSelector control.

What is the new behavior?

Add vertical orientation support for RangeSelector control.

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
  • New component
    • Documentation has been added
    • Sample in sample app has been added
    • Analyzers are passing for documentation and samples
    • Icon has been created (if new sample) following the Thumbnail Style Guide and templates
  • Tests for the changes have been added (if applicable)
  • Header has been added to all new source files
  • Contains NO breaking changes

Other information

Image Image

Copilot AI review requested due to automatic review settings December 3, 2025 16:15
@Illustar0

Illustar0 commented Dec 3, 2025 •

Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds vertical orientation support to the RangeSelector control, allowing it to be displayed vertically in addition to the existing horizontal orientation. The implementation includes proper coordinate inversion for vertical mode (top = maximum value, bottom = minimum value), visual state management, and support for keyboard, pointer, and drag interactions in both orientations.

Key Changes

  • Added Orientation dependency property with horizontal/vertical support
  • Implemented coordinate inversion logic for vertical mode across all input methods
  • Added visual states for orientation with appropriate XAML template adjustments

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
RangeSelector.xaml Added OrientationStates visual state group with layout adjustments for vertical mode
RangeSelector.cs Added visual state constants, Loaded event handler for initial sync, and orientation-aware SyncThumbs/SyncActiveRectangle methods
RangeSelector.Properties.cs Added Orientation property with change callback that updates visual states and syncs thumbs
RangeSelector.Input.Pointer.cs Updated pointer event handlers to support vertical coordinate system with proper inversion
RangeSelector.Input.Key.cs Added Up/Down key support for vertical mode and refactored keyboard handling
RangeSelector.Input.Drag.cs Added DragThumbVertical method and updated drag handlers for vertical orientation
RangeSelector.md Added documentation section for vertical orientation with sample reference

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Illustar0 Illustar0 changed the title Add vertical orientation support for RangeSelector control [RangeSelector] Add support for vertical orientation Dec 3, 2025
@Illustar0
Illustar0 requested a review from Copilot December 4, 2025 17:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Illustar0
Illustar0 marked this pull request as draft December 4, 2025 17:36
@Illustar0
Illustar0 marked this pull request as ready for review December 4, 2025 17:48
@michael-hawker michael-hawker added this to the 8.3 milestone Dec 8, 2025
@michael-hawker michael-hawker added the preview Used to track feature Issues/PRs to include in the next preview release label Jan 5, 2026
@Arlodotexe Arlodotexe added components::controls::rangeselector A double Slider control that allows the user to select a sub-range of values from a larger range. enhancement New feature or request labels Jan 7, 2026
@Arlodotexe
Arlodotexe enabled auto-merge (rebase) February 10, 2026 19:07
@Arlodotexe
Arlodotexe merged commit 4b1db5a into CommunityToolkit:main Feb 10, 2026
41 of 42 checks passed
@Illustar0
Illustar0 deleted the feat/allow-vertical-rangeselector branch February 11, 2026 11:22
This was referenced Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components::controls::rangeselector A double Slider control that allows the user to select a sub-range of values from a larger range. enhancement New feature or request 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] RangeSelector arrow-key inverted in RightToLeft [RangeSelector] Add support for vertical orientation

5 participants