More cleanup and fixes

This commit is contained in:
2023-04-12 11:35:19 -04:00
parent 64d0f770ca
commit a81cf5e69f
28 changed files with 472 additions and 473 deletions

View File

@@ -1,11 +1,30 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type TextBox}">
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<StackPanel Orientation="Horizontal">
<AdornedElementPlaceholder x:Name="placeholder" />
<TextBlock FontSize="14"
Margin="2,0"
Foreground="White"
Background="Red"
TextAlignment="Center"
Width="16"
Text="!"
ToolTip="{Binding AdornedElement.(Validation.Errors)[0].ErrorContent, ElementName=placeholder}" />
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="Validation.HasError"
Value="true">
<Setter Property="ToolTip"
Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors)[0].ErrorContent}" />
<Setter Property="Margin"
Value="0,0,18,0" />
</Trigger>
</Style.Triggers>
</Style>