I have a textbox on a wpf form that has 2 buttons next and previous when the textbox is in error next is disabled.
cmdNextPage_CanExecute(object sender, CanExecuteRoutedEventArgs e)
{
if (!textbox.GetBindingExpression TextBox.TextProperty).HasError)
{
e.CanExecute = true;
}
}I would like to use the CommandManager.InvalidateRequerySuggested() on the lost focus of the textbox so that I can enable the next button.
Is there a way to achieve this?