title: MVVM WPF replace ListBox with Label when ItemsSource is empty or null
body: <p>I have this line in WPF (.NET 3.5) :</p>
  
  <pre><code>&lt;ListBox ItemsSource="{Binding Locks}" Style="{DynamicResource FancyListBox}" /&gt;
  </code></pre>
  
  <p>My desired behavior is that when the property Locks (an ObservableCollection) is either null or contains 0 elements, show a label like the one below instead of the ListBox.</p>
  
  <pre><code>&lt;Label Content="No locks are present" Style="{DynamicResource FancyLabel}" /&gt;
  </code></pre>
  
  <p>The only solution I can think of so far is to bind the Locks property to visibility using a valueconverter (i.e. converters like CollectionToVisibilityShowIfNull, CollectionToVisibilityShowIfNotNull), but I am not sure if that is the best solution.</p>
  
  <pre><code>... Visibility={Binding Locks, Converter={StaticResource CollectiontoVisibilityShowIfNull}} ..
  </code></pre>
  
  <p>Thanks for any help!</p>