Replies: 2 comments 2 replies
-
Another option that we can go for is just to create a custom style for the |
Beta Was this translation helpful? Give feedback.
1 reply
-
I had another thought about this: its probably better to implement this in the Windows Community Toolkit first. It will get a bit more engagement from the full community and can quickly be ported to other frameworks as needed (license is MIT). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a need to create a control similar to what is being discussed here: microsoft/microsoft-ui-xaml#2310.
A very basic implementation may be just a re-styling of RadioButtons but that may not be enough since we would want to support things like multiple selection and gestures such as swiping with a sliding selection indicator.
For a "sliding" segmented control as mentioned above, we would want to achieve something similar to Flutter's CupertinoSlidingSegmentedControl as seen in the Flutter Gallery:
Implementation
Rather than just a re-style of the RadioButtons control, I think we should be creating a new control using an ItemsRepeater as mentioned in microsoft/microsoft-ui-xaml#2310 (comment):
We would then implement the same model of
SelectedItems
that ListView has, with aSelectionMode
.The split here is how this will be implemented for single-selection and multi-selection. If we are in
SelectionMode.Single
, then we could technically just be holding anItemsRepeater
of styledRadioButton
s. If we are inSelectionMode.Multiple
then we could be holding anItemsRepeater
ofToggleButton
s.Beta Was this translation helpful? Give feedback.
All reactions