diff --git a/MVVM/CommandBinding.cls b/MVVM/CommandBinding.cls index aae8c33..254f42c 100644 --- a/MVVM/CommandBinding.cls +++ b/MVVM/CommandBinding.cls @@ -147,16 +147,16 @@ Private Property Get ICommandBinding_Command() As ICommand Set ICommandBinding_Command = this.Command End Property -Private Sub ICommandBinding_EvaluateCanExecute(ByVal Context As Object) - EvaluateCanExecute Context +Private Sub ICommandBinding_EvaluateCanExecute() + EvaluateCanExecute End Sub -Private Sub EvaluateCanExecute(ByVal Source As Object) +Private Sub EvaluateCanExecute() If this.Target Is Nothing Then Exit Sub If this.Command Is Nothing Then this.Target.Enabled = False Else - this.Target.Enabled = this.Command.CanExecute(Source) + this.Target.Enabled = this.Command.CanExecute(this.ViewModel) End If End Sub diff --git a/MVVM/ICommandBinding.cls b/MVVM/ICommandBinding.cls index dcc958e..7ef2d08 100644 --- a/MVVM/ICommandBinding.cls +++ b/MVVM/ICommandBinding.cls @@ -25,6 +25,6 @@ Attribute Command.VB_Description = "Gets the command bound to the event source." End Property '@Description "Evaluates whether the command can execute given the binding context." -Public Sub EvaluateCanExecute(ByVal Context As Object) +Public Sub EvaluateCanExecute() Attribute EvaluateCanExecute.VB_Description = "Evaluates whether the command can execute given the binding context." End Sub