Browse Source

Merge pull request #5910 from AvaloniaUI/fixes-data-validation-errors-use-datatemplates-1

dont use datatemplate in datavalidationerrors.
pull/5921/head
Dan Walmsley 5 years ago
committed by GitHub
parent
commit
dfd18ffdde
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml

14
src/Avalonia.Themes.Fluent/Controls/DataValidationErrors.xaml

@ -27,14 +27,12 @@
<Style Selector="DataValidationErrors"> <Style Selector="DataValidationErrors">
<Style.Resources> <Style.Resources>
<DataTemplate x:Key="InlineDataValidationErrorTemplate"> <DataTemplate x:Key="InlineDataValidationErrorTemplate">
<ItemsControl Items="{Binding}"> <ItemsControl Items="{Binding}" TextBlock.Foreground="{DynamicResource SystemControlErrorTextForegroundBrush}">
<ItemsControl.ItemTemplate> <ItemsControl.Styles>
<DataTemplate> <Style Selector="TextBlock">
<TextBlock Foreground="{DynamicResource SystemControlErrorTextForegroundBrush}" <Setter Property="TextWrapping" Value="Wrap" />
Text="{Binding}" </Style>
TextWrapping="Wrap" /> </ItemsControl.Styles>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl> </ItemsControl>
</DataTemplate> </DataTemplate>
<ControlTemplate x:Key="InlineDataValidationContentTemplate" TargetType="DataValidationErrors"> <ControlTemplate x:Key="InlineDataValidationContentTemplate" TargetType="DataValidationErrors">

Loading…
Cancel
Save