Friday, December 16, 2011

Workaround to Button using MVVM ICommand and IsEnabled issue

When you are using the Command Button in MVVM pattern with ICommand, you will not be able to use the IsEnabled property to enable/disable the command button. As a workaround to enable/disable the command button, you can put the Command Button inside the group control like StackPanel and set the IsEnabled property of StackPanel to TRUE/FALSE.