Created
March 15, 2013 01:37
-
-
Save JakeGinnivan/5166866 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface IRaiseCanExecuteChanged | |
{ | |
void RaiseCanExecuteChanged(); | |
} | |
// And an extension method to make it easy to raise changed events | |
public static class CommandExtensions | |
{ | |
public static void RaiseCanExecuteChanged(this ICommand command) | |
{ | |
var canExecuteChanged = command as IRaiseCanExecuteChanged; | |
if (canExecuteChanged != null) | |
canExecuteChanged.RaiseCanExecuteChanged(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment