private void OnRepeatChanged(object sender, TextChangedEventArgs e) { bool isValid = viewModel.IsPasswordsMatches(); SetState(isValid, sender as VisualElement); SetState(isValid, passwordEntry); }