private void UpdateSelectAllFeedItems() { var newValue = !SelectedFeedItems.Any() ? false : (SelectedFeedItems.Count == SelectedFeed?.Items.Count ? true : (bool?)null); if (selectAllFeedItems != newValue) { selectAllFeedItems = newValue; RaisePropertyChanged(nameof(SelectAllFeedItems)); } }
public void SelectFeedItem(FeedItem feedItemToSelect) { if (SelectedFeedItems.Any()) { SelectedFeedItems.Clear(); } if (feedItemToSelect != null) { SelectedFeedItems.Add(feedItemToSelect); } }
private void SelectedFeedItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { SelectedFeedItem = SelectedFeedItems.FirstOrDefault(); UpdateSelectAllFeedItems(); }