Bind Count of ItemsSource of an ItemsControl in a TextBlock using WPF
<p>I want to bind a Count of ItemsSource of an ItemsControl in a TextBlock using WPF. </p>

<p>Have a Look into my tried Code</p>

<pre><code>&lt;Menu&gt;
    &lt;MenuItem&gt;
        &lt;MenuItem.Header&gt;
            &lt;TextBlock Text="{Binding Path=(ItemsControl.ItemsSource.Item, RelativeSource={RelativeSource TemplatedParent}}" /&gt;
        &lt;/MenuItem.Header&gt;

        &lt;ItemsControl ItemsSource="{Binding PersonCollection}"&gt;
            &lt;ItemsControl.ItemTemplate&gt;
                &lt;DataTemplate &gt;
                    &lt;StackPanel Orientation="Horizontal" Margin="2" MinWidth="100"&gt;
                        &lt;TextBlock Text="{Binding Value.Text}"/&gt;
                    &lt;/StackPanel&gt;
                &lt;/DataTemplate&gt;
            &lt;/ItemsControl.ItemTemplate&gt;
        &lt;/ItemsControl&gt;
    &lt;/MenuItem&gt;
&lt;/Menu&gt;
</code></pre>

<blockquote>
  <p>Note: I need to get the count based on <strong><code>ItemsControl ItemsSource</code></strong> not  by the <code>Collection.Count</code> Property. Kindly assist me.</p>
</blockquote>