Ejemplo n.º 1
0
 private void RemoveParticipant(object sender, RoutedEventArgs e)
 {
     if (participantlb.SelectedItems.Count > 0)
     {
         viewModel.RemoveParticipant(participantlb.SelectedItems);
         participantlb.SelectedItems.Clear();
         PersonsView.Refresh();
     }
 }
Ejemplo n.º 2
0
        private void AddParticipant(object sender, RoutedEventArgs e)
        {
            if (personlb.SelectedItems.Count > 0)
            {
                viewModel.AddParticipants(personlb.SelectedItems);

                personlb.SelectedItems.Clear();
                PersonsView.Refresh();
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Event handler for property changes on elements of <see cref="Persons"/>.
 /// </summary>
 /// <param name="sender">The person model.</param>
 /// <param name="e">The event arguments.</param>
 private void PersonsOnPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == nameof(PersonModel.HasErrors) || e.PropertyName == nameof(PersonModel.IsOk))
     {
         return;
     }
     if (PersonsView.IsEditingItem || PersonsView.IsAddingNew)
     {
         return;
     }
     PersonsView.Refresh();
 }