title: WPF - Bind UserControl visibility to a property
body: <p>I have a ListView bound to ObservableCollection. Data are loaded from the internet and then added to collection. The download takes few seconds and I want to indicate user that the data is loading. </p>
  
  <p>I created an UserControl that indicates activity. I placed it inside of ControlTemplate.</p>
  
  <pre><code>&lt;ControlTemplate x:Key="ListViewControlTemplate1" TargetType="{x:Type ListView}"&gt;
      &lt;Grid&gt;
          &lt;local:ActivityIndicatorControl 
              HorizontalAlignment="Center" 
              Height="Auto" 
              Margin="0" 
              VerticalAlignment="Center"/&gt;
      &lt;/Grid&gt;
  &lt;/ControlTemplate&gt;
  </code></pre>
  
  <p>I would like to bind Visibility of <code>ActivityIndicatorControl</code> to a property, let's say <code>bool IsLoading</code> and set it to Visible/Collapsed correspondingly.</p>
  
  <p>Thanks!</p>