Skip to content

Commit

Permalink
Merge pull request #403 from AvaloniaCommunity/fixDataValidationError…
Browse files Browse the repository at this point in the history
…sDisplay

Fixes missing DataValidationErrors. Fix #402
  • Loading branch information
SKProCH authored Sep 21, 2024
2 parents 0e584d0 + e34fa26 commit dcd9914
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Material.Styles/Resources/Themes/DataValidationErrors.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
<ControlTemplate>
<DockPanel Name="PART_RootPanel">
<ContentControl Name="PART_ErrorPresenter"
Content="{TemplateBinding (DataValidationErrors.Errors)}"
ContentTemplate="{TemplateBinding ErrorTemplate}"
IsVisible="{TemplateBinding (DataValidationErrors.HasErrors)}" />
DataContext="{TemplateBinding Owner}"
Content="{Binding (DataValidationErrors.Errors)}"
ContentTemplate="{TemplateBinding ErrorTemplate}"
IsVisible="{Binding (DataValidationErrors.HasErrors)}" />

<ContentPresenter Name="PART_ContentPresenter"
Margin="{TemplateBinding Padding}"
Expand Down
3 changes: 1 addition & 2 deletions Material.Styles/Resources/Themes/TextBox.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@
Text="{TemplateBinding (assists:TextFieldAssist.Hints)}"
TextTrimming="CharacterEllipsis" />

<DataValidationErrors Name="PART_DataValidation"
Errors="{TemplateBinding (DataValidationErrors.Errors)}">
<DataValidationErrors Name="PART_DataValidation">
<Panel Name="PART_TextFieldPanel">
<Border Name="PART_BackgroundTextField">
<Border.Styles>
Expand Down

0 comments on commit dcd9914

Please sign in to comment.