From 37a6d240495f47219e731be95d8efb3cc35b9ead Mon Sep 17 00:00:00 2001 From: lvas463 Date: Wed, 18 Oct 2023 13:12:36 -0400 Subject: [PATCH] Altered CancelCommand. --- PcgsInvUi/ViewModels/DeleteWindowViewModel.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/PcgsInvUi/ViewModels/DeleteWindowViewModel.cs b/PcgsInvUi/ViewModels/DeleteWindowViewModel.cs index d25afba..076b93e 100644 --- a/PcgsInvUi/ViewModels/DeleteWindowViewModel.cs +++ b/PcgsInvUi/ViewModels/DeleteWindowViewModel.cs @@ -1,8 +1,5 @@ -using System; -using System.Reactive; -using System.Windows.Input; -using System.Xml; -using Microsoft.CodeAnalysis.CSharp.Syntax; +using System.Reactive; +using PcgsInvUi.Views; using ReactiveUI; namespace PcgsInvUi.ViewModels; @@ -10,5 +7,10 @@ namespace PcgsInvUi.ViewModels; public class DeleteWindowViewModel : ViewModelBase { public ReactiveCommand OkCommand { get; } = ReactiveCommand.Create(() => (object)true); - public ReactiveCommand CancelCommand { get; } = ReactiveCommand.Create(() => (object)false); + public ReactiveCommand CancelCommand { get; } + + public DeleteWindowViewModel() + { + CancelCommand = ReactiveCommand.Create(window => window.Close()); + } } \ No newline at end of file