Skip to content

Instantly share code, notes, and snippets.

@JakeGinnivan
Created March 15, 2013 01:37
Show Gist options
  • Save JakeGinnivan/5166866 to your computer and use it in GitHub Desktop.
Save JakeGinnivan/5166866 to your computer and use it in GitHub Desktop.
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