title: WPF ComboBox - showing something different when no items are bound
body: <p>I have a ComboBox, and i want to change its look when the ItemsSource property is null. When it is in that state, i want to show a TextPanel with the text "Retrieving data" in it, and give it a look kind of similar to the watermarked textbox.</p>
  
  <p>I figure to do this i need a ControlTemplate, and a trigger. I have the ControlTemplate here: <br/><br/></p>
  
  <pre><code>&lt;ControlTemplate x:Key="LoadingComboTemplate" TargetType="{x:Type ComboBox}"&gt;  
      &lt;Grid&gt;  
          &lt;TextBlock x:Name="textBlock" Opacity="0.345" Text="Retrieving data..." Visibility="Hidden" /&gt;  
      &lt;/Grid&gt;  
      &lt;!--  
      &lt;ControlTemplate.Triggers&gt;  
          &lt;Trigger Property="ComboBox.ItemsSource" Value="0"&gt;  
              &lt;Setter Property="Visibility" Value="Visible" /&gt;  
          &lt;/Trigger&gt;  
      &lt;/ControlTemplate.Triggers&gt;  
      --&gt;  
  &lt;/ControlTemplate&gt;  
  </code></pre>
  
  <p>but my issue is how do i set up the trigger to show this when the ItemsSource property is null? I have tried a couple of different ways, and each way has given me the error message "Value 'ItemsSource' cannot be assigned to property 'Property'. Invalid PropertyDescriptor value.". My ComboBox xaml is this (including the attempted trigger): <br/></p>
  
  <pre><code>&lt;ComboBox Margin="112,35,80,0"   
        Name="MyComboBox"   
        Height="22.723"   
        VerticalAlignment="Top"   
        DisplayMemberPath="FriendlyName"   
        SelectedValuePath="Path"   
        TabIndex="160"   
        &gt;  
      &lt;Trigger&gt;  
          &lt;Condition Property="ItemsSource" Value="0" /&gt;  
          &lt;Setter Property="Template" Value="{StaticResource LoadingComboTemplate}" /&gt;  
      &lt;/Trigger&gt;    
  &lt;/ComboBox&gt;  
  </code></pre>
  
  <p>now should the trigger go on the ComboBox, or on the ControlTemplate? How do i access the ComboBox's ItemsSource property? Should i even be using a trigger?</p>
  
  <p>Thanks!</p>