You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we add an "associated value" to the items of the ListDialog ?
For example when adding the item we will call it as: dialogInstance.AddItem("Item description", itemValue);
When reading the result we will get the item index as is now: dialogResult.ListItem; //will return the index of selected item
And for get the selected item value: dialogResult.ListItemValue; //will return the value we specified on AddItem
The value will be any data you need to process or identify the selected option. For example: you create a dialog "Please select a color:" and the itemValue could store the color. Or maybe you are creating a dialog with a navigation options like "Cars", "Houses", "Go back", then itemValue may store an value from a enum so you can process the selected item in a switch statement. There are a lot of usage examples...
What do you think? Without this I end creating a own lists for each dialog and doing a lookup from my list each time.
The text was updated successfully, but these errors were encountered:
Can we add an "associated value" to the items of the ListDialog ?
For example when adding the item we will call it as:
dialogInstance.AddItem("Item description", itemValue);
When reading the result we will get the item index as is now:
dialogResult.ListItem; //will return the index of selected item
And for get the selected item value:
dialogResult.ListItemValue; //will return the value we specified on AddItem
The value will be any data you need to process or identify the selected option. For example: you create a dialog "Please select a color:" and the itemValue could store the color. Or maybe you are creating a dialog with a navigation options like "Cars", "Houses", "Go back", then itemValue may store an value from a enum so you can process the selected item in a switch statement. There are a lot of usage examples...
What do you think? Without this I end creating a own lists for each dialog and doing a lookup from my list each time.
The text was updated successfully, but these errors were encountered: