private void DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { var p = dg.CurrentItem as Product; var ew = new EditWindow(); ew.DataContext = p; ew.ShowDialog(); }
private void DataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { var p = dg.CurrentItem as ProductViewModel; var ew = new EditWindow(p.ProductID); if (ew.ShowDialog().Value) { VM.GetAllProducts(); } }