I create a pretty standard MVVM Light RelayCommand, with the canExecute parameter being:
() => (customer.Regions.Count > 0)
when necessary I call RaiseCanExecuteChanged(); and the canExecute is not reevaluated correctly. I then also call it manually like this: var canExecute = myCommand.CanExecute(null);, and it is still wrong. In the next statement right after I do var foo = (customer.Regions.Count > 0), which returns the correct result. What is going on here?
Command definition:
SaveCustomerRegionsCommand = new RelayCommand(SaveCustomerRegions, () => (customer.Regions.Count > 0));
customer is a private property set when the class is instantiated.