private void OnTextToSourceValueConversionFailed(object sender, RoutedEventArgs e) { if (AdornerStoryboard != null && adorner != null) { adorner.State = HighlightAdornerState.Visible; // Show visual indicator it has failed. AdornerStoryboard.Begin(adorner); } }
private void OnTextToSourceValueConversionFailed(object sender, RoutedEventArgs e) { if (textBoxAndAdorners != null && AdornerStoryboard != null) { var adorner = textBoxAndAdorners.FirstOrDefault(x => x.TextBox == sender).Adorner; if (adorner != null) { adorner.State = HighlightAdornerState.Visible; // Show visual indicator it has failed. AdornerStoryboard.Begin(adorner); } } }