private void BtnAdd_Click(object sender, RoutedEventArgs e) { var view = new AddConsumerView(); ViewManager.AddUserControl(view); ViewManager.OpenUserControl(view); e.Handled = true; }
private void Edit_Click(object sender, RoutedEventArgs e) { var obj = (ButtonWithObject)sender; var consumer = (Consumer)obj.Object; var view = new AddConsumerView(consumer); ViewManager.AddUserControl(view); ViewManager.OpenUserControl(view); }