public void NewPieceCmdExecute() { EditPieceDialog dlg = new EditPieceDialog(); EditPieceVM vm = new EditPieceVM(); dlg.DataContext = vm; dlg.Show(); }
public void MouseDoubleClickCmdExecute(MouseButtonEventArgs args) { if (selectedPiece != null && (args == null || args.ChangedButton == MouseButton.Left)) { EditPieceDialog dlg = new EditPieceDialog(); EditPieceVM vm = new EditPieceVM(selectedPiece.ID); dlg.DataContext = vm; dlg.Show(); } }