I have a Command, which Check for CanExecute takes much of time. Now, I ask me, if it is possible to run the Method for CanExecute asynchronous?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well it is possible. You should use the
CanExecutedChanged. Do your long lasting check in the background(you could use BackgroundWorker), store the result if you can execute or not, fire the event and just return the cached value in yourCanExecute.