title: TextBlock Text Binding an ObservableCollection.Count property
body: <p>I have a <code>ObservableCollection&lt;Sportisti&gt;</code> that starts out with 0 elements (but is initialized to a new object at the creation of the window). I wanted to bind the <code>Count</code> property to a <code>TextBox</code>. Unfortunately, this causes my application to crash whenever I try to open the window in question.</p>
  
  <p>Now, since I have a <code>ListView</code> on the same page, successfully showing the elements of the collection in question, I thought I could simply extract the number of rows from there, but that also lead to a crash.</p>
  
  <pre><code>&lt;TextBox Text="{Binding ElementName=lvTabela, Path=Items.Count}"
           Grid.Row="4" Grid.Column="1" Margin="0,3,60,3"
           DockPanel.Dock="Top" IsReadOnly="True" /&gt;
  </code></pre>
  
  <p>Note that in the .xaml file I can see the content of the TextBox is 0.</p>
  
  <p>Any idea why this is happening?</p>