<ResourceDictionary xmlns="https://github.com/avaloniaui"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <ControlTheme x:Key="{x:Type DataValidationErrors}"
                TargetType="DataValidationErrors">
    <Setter Property="Template">
      <ControlTemplate>
        <DockPanel LastChildFill="True">
          <ContentControl x:DataType="DataValidationErrors"
                          Content="{Binding (DataValidationErrors.Errors)}"
                          ContentTemplate="{TemplateBinding ErrorTemplate}"
                          DataContext="{TemplateBinding Owner}"
                          DockPanel.Dock="Right"
                          IsVisible="{Binding (DataValidationErrors.HasErrors)}" />
          <ContentPresenter Name="PART_ContentPresenter"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}"
                            CornerRadius="{TemplateBinding CornerRadius}" />
        </DockPanel>
      </ControlTemplate>
    </Setter>
    <Setter Property="ErrorTemplate">
      <DataTemplate>
        <Canvas Width="14"
                Height="14"
                Margin="4,0,1,0"
                Background="Transparent">
          <Canvas.Styles>
            <Style Selector="ToolTip">
              <Setter Property="BorderBrush" Value="{DynamicResource ErrorBrush}" />
            </Style>
          </Canvas.Styles>
          <ToolTip.Tip>
            <ItemsControl x:DataType="DataValidationErrors"
                          ItemsSource="{Binding}" />
          </ToolTip.Tip>
          <Path Data="M14,7 A7,7 0 0,0 0,7 M0,7 A7,7 0 1,0 14,7 M7,3l0,5 M7,9l0,2"
                Stroke="{DynamicResource ErrorBrush}"
                StrokeThickness="2" />
        </Canvas>
      </DataTemplate>
    </Setter>
  </ControlTheme>
</ResourceDictionary>