Not able to find ToggleButton in CollectionViewGroup
<p>I'm trying to find a <code>ToggleButton</code> associated in my CollectionViewGroup, my xaml structure is the following:</p>

<pre><code> &lt;UserControl.Resources&gt;
    &lt;CollectionViewSource Source="{Binding Matches}" x:Key="GroupedItems"&gt;
        &lt;CollectionViewSource.GroupDescriptions&gt;
            &lt;PropertyGroupDescription PropertyName="MatchNation" /&gt;
            &lt;PropertyGroupDescription PropertyName="MatchLeague" /&gt;
        &lt;/CollectionViewSource.GroupDescriptions&gt;
&lt;/UserControl.Resources&gt;
</code></pre>

<p>How you can see I've a <code>CollectionViewGroup</code> that filter the <code>ObservableCollection</code> binded <code>Matches</code> for <code>Nation</code> and <code>League</code>.</p>

<p>For this I've declared a <code>ListView</code> that have two <code>GroupStyle</code>, one that filter for <code>Country</code> and another for <code>League</code>, in this piece of code I add only the second GroupStyle (that contains the ToggleButton):</p>

<pre><code>&lt;ListView ItemsSource="{Binding Source={StaticResource GroupedItems}}"&gt;
    &lt;!-- this is the second group style --&gt;
    &lt;ListView.GroupStyle&gt;
         &lt;GroupStyle&gt;
            &lt;GroupStyle.ContainerStyle&gt;
                &lt;Style TargetType="{x:Type GroupItem}" &gt;
                    &lt;Setter Property="Template"&gt;
                        &lt;Setter.Value&gt;
                            &lt;ControlTemplate&gt;
                                &lt;Expander IsExpanded="True" Background="#4F4F4F"&gt;
                                    &lt;Expander.Header&gt;
                                        &lt;DockPanel Height="16.5"&gt;
                                            &lt;TextBlock Text="{Binding Name}" FontWeight="Bold" Foreground="White" FontSize="11.5" VerticalAlignment="Bottom" /&gt;

                                            &lt;ToggleButton Checked="{Binding IsFavourite}" HorizontalAlignment="Right"/&gt;

                                        &lt;/DockPanel&gt;
                                    &lt;/Expander.Header&gt;
                                    &lt;ItemsPresenter /&gt;
                                &lt;/Expander&gt;
                            &lt;/ControlTemplate&gt;
                        &lt;/Setter.Value&gt;
                    &lt;/Setter&gt;
                &lt;/Style&gt;
            &lt;/GroupStyle.ContainerStyle&gt;
        &lt;/GroupStyle&gt;
    &lt;/ListView.GroupStyle&gt;
&lt;/ListView&gt;
</code></pre>

<p>So, how you can see in the second group style (<code>Nation -&gt; League</code>) I've a ToggleButton.</p>

<p>Now the GroupStyle will be repeated based on the items available in the <code>ObservableCollection</code>, so for example:</p>

<pre><code>|England
    |Premier League
     1. item  
     2. item 
     3. item 
|Afghanistan
     |Afghan Premier League
     1. item 
     2. item 
</code></pre>

<p>this is the organization, now imagine that for <code>Premier League</code> of <code>England</code> and for <code>Afghan Premier League</code> of <code>Afghanistan</code> there is a <code>ToggleButton</code> that I've inserted on the right, I need to get all the <code>ToggleButtons</code> of each <code>Group</code> available on the list. I tried this:</p>

<pre><code>var playingListSource = (ListCollectionView).Playing.Items.SourceCollection;

foreach (var gp in playingListSource.Groups)
{
       var rootGroup = (CollectionViewGroup)gp; //Convert the nested group
       var parentGroup = rootGroup.Items;
}
</code></pre>

<p>Essentially I extract the Group of the list and tried to find the ToggleButton on the nester group, but I cannot find it. Someone could help me?</p>