I do not like any of the answers here. Simply put, how do I change the border color for an error template for a ComboBox using Blend or not? Do not accept another border around the existing ComboBox border. I figured out how to create a ControlTemplate in Blend, but not a Validation template.
I came close, trying to make it look like I had changed the actual border color, but thatβs not what I really want. Suggestions? To complicate it, I would like to display a red asterisk outside the right border of the control.
The following code is a close attempt, but it actually draws a frame inside the ComboBox, and if you look closely, you will see that the border is 2 pixels wide in combination with the ComboBox border:
<DockPanel Name="myDockPanel"> <AdornedElementPlaceholder> <Border BorderBrush="Blue" BorderThickness="1" CornerRadius="2" /> </AdornedElementPlaceholder> <TextBlock Text="*" FontWeight="Bold" FontSize="14" Foreground="Red" DockPanel.Dock="Left" ToolTip="{Binding .CurrentItem}" /> </DockPanel>
source share