Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToolkitSampleMultipleChoiceOption broken #76

Open
20 tasks
Avid29 opened this issue Feb 24, 2023 · 7 comments
Open
20 tasks

ToolkitSampleMultipleChoiceOption broken #76

Avid29 opened this issue Feb 24, 2023 · 7 comments
Labels
bug 🐛 Something isn't working

Comments

@Avid29
Copy link
Contributor

Avid29 commented Feb 24, 2023

Describe the bug

The ToolkitSampleMultiChoiceOption is unable to parse data.

The error
image

The sample choices
image

The sample XAML
image

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.

@Avid29 Avid29 added the bug 🐛 Something isn't working label Feb 24, 2023
@Arlodotexe
Copy link
Member

@niels9001 I think you made changes here recently, any idea?

@niels9001
Copy link
Collaborator

@Arlodotexe @Avid29 CommunityToolkit/Labs-Windows#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?

@Avid29
Copy link
Contributor Author

Avid29 commented Feb 24, 2023

@niels9001 I will try it for speed, however the RepeatBehavior is still broken and requires the Multi-Choice

@niels9001
Copy link
Collaborator

@niels9001 I will try it for speed, however the RepeatBehavior is 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.

@Avid29
Copy link
Contributor Author

Avid29 commented Feb 24, 2023

RepeatBehavior is not an enum

@niels9001
Copy link
Collaborator

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)

@michael-hawker
Copy link
Member

This seems related to this feature request I had added I think? CommunityToolkit/Labs-Windows#149

@niels9001 niels9001 transferred this issue from CommunityToolkit/Labs-Windows Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants