Skip to content

Commit

Permalink
Merge pull request #4122 from MahApps/fix/4120
Browse files Browse the repository at this point in the history
Fix position of ValidationErrorTemplate together with ValidatesOnExceptions
  • Loading branch information
punker76 committed Jun 10, 2021
1 parent 4025dca commit 8c992b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
Style="{DynamicResource MahApps.Styles.TextBox.Button}" />
<TextBox Margin="{StaticResource ControlMargin}"
mah:TextBoxHelper.Watermark="Number smaller than 10"
Text="{Binding IntegerGreater10Property, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True}" />
Text="{Binding IntegerGreater10Property, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged, NotifyOnValidationError=True}" />
<TextBox Margin="{StaticResource ControlMargin}"
mah:TextBoxHelper.SelectAllOnFocus="True"
Text="Select all on focus" />
Expand Down
4 changes: 2 additions & 2 deletions src/MahApps.Metro/Controls/CustomValidationPopup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ private void OnTransitionCompleted(object sender, RoutedEventArgs e)

private void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
this.RefreshPosition();

if (e.VerticalChange > 0 || e.VerticalChange < 0 || e.HorizontalChange > 0 || e.HorizontalChange < 0)
{
this.RefreshPosition();

if (IsElementVisible(this.AdornedElement as FrameworkElement, this.scrollViewer))
{
var adornedElement = this.AdornedElement;
Expand Down

0 comments on commit 8c992b2

Please sign in to comment.