I have a page where a few textboxes cannot be empty before clicking a Save button.
Because it's still missing, here is an adaption of Developer's answer in case the link ever goes away:
XAML:
CodeBehind/C#:
private int _numberOfValidationErrors;
public bool HasNoValidationErrors => _numberOfValidationErrors = 0;
private void handleValidationError(object sender, ValidationErrorEventArgs e)
{
if (e.Action == ValidationErrorEventAction.Added)
_numberOfValidationErrors++;
else
_numberOfValidationErrors--;
}