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