Method SetSelectionAsync
SetSelectionAsync(IEnumerable<String>)
This function changes the selection.
Declaration
public Task<bool> SetSelectionAsync(IEnumerable<string> selection)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.String> | selection | The desired selection. Pass to switch all buttons off.
|
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
Examples
This selects the first choice if present
if (0 < radioButton.Choices.Count)
await radioButton.SetSelectionAsync(new List<string>() { radioButton.Choices.ElementAt(0) });
Should switch all radio buttons off
await radioButton.SetSelectionAsync(null);