Not having english as my primary language, I often question grammar when naming methodes and properties.
I use NextCommand as name for my command, NextCommandExecuted for the execution method and CanNextCommand for the status.
Does this make sense, or is there a more correct naming convention I should use?
The Execute method contains the command's functionality. This is run automatically when the user correctly interacts with a control, or presses a keyboard combination, that is linked to the command. CanExecute. The CanExecute method is called by WPF to determine whether or not the command is currently available.
WPF-routed commands give you a specific mechanism for hooking up UI controls such as toolbar buttons and menu items to handlers without introducing a lot of tight coupling and repetitive code into your application.
Commands in WPF are created by implementing the ICommand interface. ICommand exposes two methods, Execute, and CanExecute, and an event, CanExecuteChanged. Execute performs the actions that are associated with the command. CanExecute determines whether the command can execute on the current command target.
In your suggested names NextCommandExecuted sounds/seems like the command has been executed or it has completed its execution which sounds a bit incorrect to me.
I would prefer
NextCommand
NextCommandExecute
and
CanNextCommandExecute
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With