title: Checkbox controls in a groupbox which is a child of a parent stackpanel
body: <p>I have a WPF form with the stackpanel(name is MainStackPanel) as the parent. It has various groupboxes as its children. each groupbox has two checkboxes(checkbox1 and checkbox2).</p>
  
  <p>Now I want to add a check all button to the Mainstack Panel which when clicked will automatically check all the checkbox1 in each group.</p>
  
  <p>I am new to WPF and trying to find out how to achieve this </p>
  
  <pre><code>&lt;EDIT&gt;
  
  &lt;StackPanel x:Name="MainStackPanel" Orientation="Vertical"&gt; 
  
     &lt;Grid DataContext="{Binding}"&gt; 
  
        &lt;Button Content="UnCheck All" Height="23" Name="uncheckall" 
                Width="75" Margin="434,0,492,0" /&gt; 
  
        &lt;Button Content="Check All" Height="23" Name="checkall" Width="75"
                Margin="175,0,751,0" Click="checkall_Click" /&gt;
  
     &lt;/Grid&gt;
  
     &lt;GroupBox&gt;
        &lt;Grid&gt;
           &lt;Grid.RowDefinitions&gt;
             &lt;RowDefinition Height="30"/&gt;
             &lt;RowDefinition/&gt;
           &lt;/Grid.RowDefinitions&gt;
  
           &lt;CheckBox x:Name="checkbox1" 
                     Style="{StaticResource styleCheckBoxLeftSideText}" 
                     IsChecked="{Binding Path=Disabled, 
                                 Converter={StaticResource BooleanConverter},
                                 ConverterParameter='false,true'}"
                     VerticalAlignment="Center" 
                     HorizontalAlignment="Left" 
                     Content="Task Enabled:" 
                     Margin="9,0,0,0"/&gt;
        &lt;/Grid&gt;
     &lt;/GroupBox&gt; 
  &lt;/StackPanel&gt;
  
  &lt;/EDIT&gt;
  </code></pre>