void OnCaseTappedCommandCommand(DisplayCase displayCase) { if (!displayCase.Required) { displayCase.Selected = !displayCase.Selected; displayCase.ImageSource = GetSelectedImageSource(displayCase.Selected, displayCase.Required); // add or remove from the list if (displayCase.Selected) { SelectedCaseIds.Add(displayCase.Case.ID); } else { SelectedCaseIds.Remove(displayCase.Case.ID); } SelectedUsersChanged?.Invoke(this, new SelectedUsersChangedEventArgs { SelectedCaseIds = SelectedCaseIds }); } }
public UsersView() { this.SelectionChanged += (o, e) => SelectedUsersChanged?.Invoke(this, new EventsArgs <IMessageTarget[]>(SelectedUsers)); }