ToolkitSampleMultipleChoiceOption broken
Describe the bug
The ToolkitSampleMultiChoiceOption is unable to parse data.
The error

The sample choices

The sample XAML

Steps to reproduce
Use https://github.com/Avid29/Labs-Windows/tree/marquee
Expected behavior
The strings should be parsed for XAML binding
Screenshots
No response
Code Platform
- [ ] UWP
- [ ] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK
Windows Build Number
- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [ ] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [ ] Windows 10, version 2004 (Build 19041)
- [ ] Other (specify)
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
No response
Additional context
This is breaking my PR for CommunityToolkit/Labs-Windows#275
Help us help you
No, I'm unable to contribute a solution.
@niels9001 I think you made changes here recently, any idea?
@Arlodotexe @Avid29 https://github.com/CommunityToolkit/Labs-Windows/pull/336 introduced changes in this space.
@Avid29 We now have the NumericOption (see example in the PR above) and is more appropriate. Could you try that to see if that works?
@niels9001 I will try it for speed, however the RepeatBehavior is still broken and requires the Multi-Choice
@niels9001 I will try it for speed, however the
RepeatBehavioris still broken and requires the Multi-Choice
See https://github.com/CommunityToolkit/Labs-Windows/blob/main/components/SegmentedControl/samples/SegmentedControlBasicSample.xaml.cs#L12
To parse strings to enum a concerting method is required. See the XAML/CS in the above file as a sample.
RepeatBehavior is not an enum
RepeatBehavior is not an enum
Yeah, my point was that you might need to convert it manually.. (from string to x). See the previous example.
Might be the same for the speed stuff.. could be that it's parsed as a string, but your control asks for a double. Adding a function to convert should solve that (or using the NumericOption which is more appropriate)
This seems related to this feature request I had added I think? https://github.com/CommunityToolkit/Labs-Windows/issues/149