title: changing border of combo box in wpf c#
body: <p>I want to change combo box border color if it is empty.</p>
  
  <p>I tried with following code, which does not work. For text box, it was working fine.</p>
  
  <p><strong>in xaml</strong></p>
  
  <pre><code>&lt;ComboBox HorizontalAlignment="Left" Height="23" Margin="125,14,0,0"  VerticalAlignment="Top" Width="151" Name="CountryName" ItemsSource="{Binding DpData}" DisplayMemberPath="CountryName" SelectedValuePath="CountryID" Grid.Column="1" Grid.ColumnSpan="2"  BorderThickness="3" BorderBrush="{x:Null}" /&gt;
  </code></pre>
  
  <p><strong>in C#</strong></p>
  
  <pre><code>if (CountryName.Text == "")
  {
      CountryName.BorderBrush = Brushes.Red;
  }
  </code></pre>