void PersonsView_Loaded(object sender, RoutedEventArgs e) { PersonsView personsView = (PersonsView)sender; manager.Bars["mainBar"].UnMerge(); manager.Bars["mainBar"].Merge(personsView.ChildBar); }
public void Execute() { PersonsView personsView = new PersonsView { Persons = addressBook }; personsView.Display(); }
private void RemoveParticipant(object sender, RoutedEventArgs e) { if (participantlb.SelectedItems.Count > 0) { viewModel.RemoveParticipant(participantlb.SelectedItems); participantlb.SelectedItems.Clear(); PersonsView.Refresh(); } }
private void AddParticipant(object sender, RoutedEventArgs e) { if (personlb.SelectedItems.Count > 0) { viewModel.AddParticipants(personlb.SelectedItems); personlb.SelectedItems.Clear(); PersonsView.Refresh(); } }
/// <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(); }
public App() { InitializeComponent(); MainPage = new PersonsView(); }
private void OpenPersonsWindow(object sender, RoutedEventArgs e) { var view = new PersonsView(_uow); view.ShowDialog(); }