title: Set Background color of ItemsControl
body: <p>In my WPF Application, I have Item control which shows Dates and Days of a week.
  Now,I need to change the background color of the Item which is today's date.
  Here is the XAML code</p>
  
  <pre class="lang-html prettyprint-override"><code>  &lt;ItemsControl Grid.Column="1"
                  Focusable="False" 
                 ItemsSource="{Binding WeekDays}"&gt;
                  &lt;ItemsControl.ItemsPanel&gt;
                      &lt;ItemsPanelTemplate&gt;
                          &lt;StackPanel Orientation="Horizontal"/&gt;
                      &lt;/ItemsPanelTemplate&gt;
                  &lt;/ItemsControl.ItemsPanel&gt;
                  &lt;ItemsControl.ItemTemplate &gt;
                      &lt;DataTemplate&gt;
                          &lt;Border BorderBrush="{StaticResource GrayBrush7}"
                                  BorderThickness="1,0,0,0"
                                  SnapsToDevicePixels="True"
                                  UseLayoutRounding="True"&gt;                                
                              &lt;StackPanel Margin="2" 
                                        VerticalAlignment="Center"&gt;
                                  &lt;TextBlock HorizontalAlignment="Center"
                                             VerticalAlignment="Top"                                               
                                             Text="{Binding Day}"
                                             TextAlignment="Center"/&gt;
  
                                  &lt;TextBlock HorizontalAlignment="Center"
                                             VerticalAlignment="Top"                                               
                                             Text="{Binding Date, 
                                                  StringFormat='dd/MM/yyyy'}"
                                             TextAlignment="Center"/&gt;
                              &lt;/StackPanel&gt;
                          &lt;/Border&gt;
                          &lt;/DataTemplate&gt;
                  &lt;/ItemsControl.ItemTemplate&gt;
              &lt;/ItemsControl&gt;
  </code></pre>
  
  
  
  <p>Thanks in Advance.</p>