diff --git a/ColorKraken/CommandMixins.cs b/ColorKraken/CommandMixins.cs new file mode 100644 index 0000000..842a216 --- /dev/null +++ b/ColorKraken/CommandMixins.cs @@ -0,0 +1,13 @@ +using System.Windows; + +using Microsoft.Toolkit.Mvvm.Input; + +namespace ColorKraken; + +public static class CommandMixins +{ + public static void RaiseCanExecuteChanged(this IRelayCommand command) + { + Application.Current.Dispatcher.Invoke(() => command.NotifyCanExecuteChanged()); + } +} diff --git a/ColorKraken/MainWindow.xaml b/ColorKraken/MainWindow.xaml index f310ebb..ef208f6 100644 --- a/ColorKraken/MainWindow.xaml +++ b/ColorKraken/MainWindow.xaml @@ -39,11 +39,13 @@ - + @@ -90,23 +92,35 @@ - -