[WPF] ChoiceSet isMultiSelect property ignored (v4.0.30319)
ChoiceSet has a property isMultiSelect which serves no purpose. True or False is ignored and the value array is considered to be the selected element collection.

If this property remains and is set to False or committed, should only the first Choice element ID be the selected element
{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "Input.ChoiceSet",
"value": "d8cf56d0-1741-4eae-8231-6dd805f3289e , 35e1c0b7-572f-4c96-b813-7212fb671289",
"style": "expanded",
"choices": [
{
"title": "value 1",
"value": "d8cf56d0-1741-4eae-8231-6dd805f3289e"
},
{
"title": "value 2",
"value": "35e1c0b7-572f-4c96-b813-7212fb671289"
}
],
"id": "cca256e5-3336-4565-9fb4-f4a3408b63ca"
}
]
}
It's working for me in the latest dotnet2 branch. You were missing the "isMultiSelect": true from what you pasted

Apologies - I don't think I explained it that well.
If you remove the isMultiSelect property, then it still stays with both checked - so in other words, isMultiSelect is set to False, and both are still selected.
Ah that's an interesting edge case! I'm kind of on the fence on how to address this. It's really a "user error" by specifying multiple values in the card and not setting isMultiSelect to true. What would you expect the renderer to do in this case?
I think it should take the first element in the array. It's kinda odd though.
I used the isMultiSelect property to also inform the designer interaction and I assume some renderers would also need it for that purpose?
Hmm I don't think I'm 100% following your scenario with the designer. Can you provide a bit more detail?
In this image you can see that the elements are correctly rendered to radiobuttons - which should only allow a single element to be "isChecked" within the group but both are still checked here

I wanted to show you the UX here to perhaps make it clearer. This was a defect in the designer as well (which is why I noticed it - fix available in next version)
In this image we have a choiceset with two choices.

This is represented as
{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "Input.ChoiceSet",
"value": "35e1c0b7-572f-4c96-b813-7212fb671289 , d8cf56d0-1741-4eae-8231-6dd805f3289e",
"style": "expanded",
"isMultiSelect": true,
"choices": [
{
"title": "value 1",
"value": "d8cf56d0-1741-4eae-8231-6dd805f3289e"
},
{
"title": "value 2",
"value": "35e1c0b7-572f-4c96-b813-7212fb671289"
}
],
"id": "cca256e5-3336-4565-9fb4-f4a3408b63ca"
}
]
}
PLEASE NOTE in the ChoiceSet value array, the 2nd choice is index 0
With those two choices selected, when the user now sets isMultiSelect = false, the designer immediately ensures that the index 0 element becomes the only selected element

This is the example of using the element property set to also change the designer UX. The designer property for choices (a listbox) switches between single and extended selection mode.
If I do not implement that in the designer, then the renderer incorrectly shows two radio boxes checked, even when isMultiSelect = false.
The behavior I'm seeing is not consistent across renderers. This is the payload I'm using (notice in the Input.ChoiceSet, isMultiSelect is false but multiple values are specified):
{
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "Input.ChoiceSet",
"value": "1,3",
"isMultiSelect": false,
"style": "expanded",
"choices": [
{
"title": "value 1",
"value": "1"
},
{
"title": "value 2",
"value": "2"
},
{
"title": "value 3",
"value": "3"
}
],
"id": "4"
}
]
}
-
NodeJS and Android: None of the choices is selected
-
UWP and .NET HTML: The choice with the biggest value among those specified is selected
-
.NET WPF: All specified choices are selected
Looks like the .NET WPF way is definitely wrong but we also need to decide which one of the first 2 is good and proceed to modify the others.
The NodeJS library is correct IMO (obviously :)) as the value provided "1,3" doesn't match any of the choice values. The contract when isMultiSelect is false is that the "value" property must match one of the choice values; specifying several values separated by a comma isn't a supported scenario. The contract is different when isMultiSelect is set to true, in which case multiple values separated by a comma is supported.
I just tried on iOS renderer, and it doesn't display any choices, and I think not displaying the values is more consistent with what we have done with error handling. e.g. in the background color when we see bad value, we generate warnings, then replace the value with most benign value, 0.
Awesome! I'll fix the UWP and .NET renderers accordingly