void IListItemContainer.NotifyItemSelectedPropertyChanged(ListItemBase item, bool isSelected) { if (isSelected) { UnselectAll(item); SetValue(SelectedItemProperty, item); SetValue(SelectedValueProperty, item.Value); } }
public void UnselectAll(ListItemBase except = null) { foreach (var child in GetSelectedItems()) { if (child != except) { child.IsSelected = false; } } }