I have the following custom Validation.ErrorTemplate:
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<DockPanel LastChildFill="True">
<Label DockPanel.Dock="Bottom" Foreground="Red" Content="{Binding ErrorContent}" Margin="0,5,0,0" Background="LightGray"/>
<Border BorderBrush="Red" BorderThickness="2">
<AdornedElementPlaceholder/>
</Border>
</DockPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
The problem is when the ErrorContents are wider than say a TextBox that is using this style, the red border sizes itself to the ErrorContents instead of the original control. How do I force the border to always be the size of the control, not the ErrorContents?