I would like to maximize the item selections in a Gridview, so that the user should select 1 or 2 items. In XAML there are only predefined options in SelectionMode like Multiple, Extended, Single, None. I’m afraid I need another way to maximize the selections. Could you give me a suggestion?
I would like to maximize the item selections in a Gridview, so that the
Share
One way to mimic maximum 2 selection is to subscibe on the SelectionChanged event and remove the first/last element from the SelectedItems collection:
XAML:
Codebehind: