remove red rectangle around combobox

Use this to modify the Validation.ErrorTemplate

<ControlTemplate x:Key="ComboBoxValidationErrorTemplate">
    <DockPanel>
        <Border BorderBrush="Blue" BorderThickness="4">
            <AdornedElementPlaceholder />
        </Border>
    </DockPanel>
</ControlTemplate>

And then use it in your ComboBox like

<ComboBox Validation.ErrorTemplate="{StaticResource ComboBoxValidationErrorTemplate}"
          ...>

To have no indication of a Validation Error, remove the DockPanel, set Visibility to Collapsed or any other way you like.

Almost forgot, probably the easiest way to remove the “Red Border”

<ComboBox Validation.ErrorTemplate="{x:Null}"
          ...>

Leave a Comment