¿Por qué no hay texto de información sobre herramientas en los errores?Errores de validación de WPF: configuración de información sobre herramientas con el mensaje de error
<Style TargetType="{x:Type TextBox}">
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<StackPanel>
<Border ...>
<AdornedElementPlaceholder ...
ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" />
</Border>
...
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
También he notado que
<AdornedElementPlaceholder ...
ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" />
falla pero los suceeds abajo, incluso con la misma unión, ¿por qué es esto así? ¿No se refiere AdornedElementPlaceholder
al cuadro de texto? Incluso si no lo hace, ¿no debería aparecer una información sobre herramientas en algún lugar?
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="True">
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" />
</Trigger>
</Style.Triggers>
solución está muy bien, pero para evitar excepciones en la ventana de Output.Debug que haría que su información sobre herramientas vinculante sobre herramientas = "{Binding RelativeSource = {self} RelativeSource, Path = Child.AdornedElement. (Validation.Errors) .CurrentItem.ErrorContent} " – Dude0001