title: Show default item in ListBox
body: <p>I'm trying to make a ListBox show an initial value before I'm adding items into it (something like: "No files added"), but I'm getting the error " Items collection must be empty before using ItemsSource.".</p>
  
  <p>I'm new to WPF and I'm not sure in which direction to go from here. I've looked at the INotifyPropertyChanged interace, but it seems like an overly complicated solution to a simple problem (or am I misunderstanding the use of INotifyPropertychanged?). </p>
  
  <p>My XAML looks like this: </p>
  
  <pre><code>  &lt;ListBox ItemsSource="{Binding}"
               Name="DbListBox"
               Grid.Column="3"
               HorizontalAlignment="Left"
               Height="246"
               Margin="0,99,0,0"
               Grid.Row="1"
               VerticalAlignment="Top"
               Width="211"
               SelectionMode="Single"
               SelectedItem="{Binding Path=selectedDB,Mode=TwoWay}" 
               AllowDrop="True"
               Drop="DbListBox_Drop"&gt;
          &lt;DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Items.Count}" Value="0"&gt;
              &lt;Setter Property="ListBox.DataContext"&gt;
                  &lt;Setter.Value&gt;
                      &lt;ControlTemplate&gt;
                          &lt;TextBlock&gt;Drag .db file here or add below&lt;/TextBlock&gt;
                      &lt;/ControlTemplate&gt;
                  &lt;/Setter.Value&gt;
              &lt;/Setter&gt;
          &lt;/DataTrigger&gt;
      &lt;/ListBox&gt;
  </code></pre>
  
  <p>In my code-behind I have this ObservableCollection <code>public ObservableCollection&lt;string&gt; DbCollection;</code> which I'm setting as the ListBox' ItemsSource which is where I'm getting the error, at the Items collection apparently has to be empty before I can assign something else to it:</p>
  
  <pre><code>        DbListBox.ItemsSource = DbCollection;
          this.DataContext = this;  
  </code></pre>
  
  <p>`</p>
  
  <p>Any suggestions?</p>