TextBox の単純な Validation.ErrorTemplate を次のように宣言しました。
<Style TargetType="{x:Type TextBox}" BasedOn="{StaticResource {x:Type TextBox}}">
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<DockPanel LastChildFill="True">
<TextBlock Text="!" DockPanel.Dock="Right"
FontSize="{TemplateBinding TextBox.FontSize}"
Foreground="Red"/>
<AdornedElementPlaceholder Name="adornerPlaceholder" />
</DockPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
感嘆符のフォント サイズは TextBox と同じフォント (編集)サイズになることを期待していますが、期待どおりの結果にはならず、常に既定のフォント サイズが取得されます。さらに、 を使って Binding を試みRelativeSource={RelativeSource Mode=TemplatedParent}, Path=FontSize
ましたが、これも解決できません。なぜこのような状況が発生したのですか?感嘆符を TextBox と同じサイズにするにはどうすればよいですか?