failedtofail
Member
- Joined
- Jun 16, 2022
- Messages
- 20
- Programming Experience
- Beginner
My program is based on the MVVM structure. In essence the click of a button kicks of a series of calcs with the answers displayed in textboxes. Button is bound to a property of ICommand type in the ViewModel.
I currently have:
All tutorials I've watched seem to just have the above for the CanExecuteMethod - always returning true. I am looking for an example on how I can modify the return statement of this method to return false once the program has finished executing so that I can activate a list of options for the user such as Redo Calcs, Print Output, Go to Main Menu, etc. once the program has finished.
I have not implemented these yet, but my thoughts are to have these further options being implemented by associated buttons (tied to other ICommands) with these buttons appearing below the outputs once the CanExecute returns false.
Thanks.
I currently have:
C#:
public bool CanExecute(object parameter)
{
return true;
}
All tutorials I've watched seem to just have the above for the CanExecuteMethod - always returning true. I am looking for an example on how I can modify the return statement of this method to return false once the program has finished executing so that I can activate a list of options for the user such as Redo Calcs, Print Output, Go to Main Menu, etc. once the program has finished.
I have not implemented these yet, but my thoughts are to have these further options being implemented by associated buttons (tied to other ICommands) with these buttons appearing below the outputs once the CanExecute returns false.
Thanks.