WPF Expender Control

WPF Expender Control 

 
The Expander control is like a GroupBox.  It derives from HeaderedContentControl, so it has a Header property to set the header content, and a Content property for the expandable content.
 
It has an IsExpanded property to get and set the expanded or collapsed state.
  1. <Grid>  
  2.     <Expander Header="Select Answer">  
  3.         <StackPanel Margin="15,5,0,0">  
  4.             <CheckBox Margin="5" Content="One" />  
  5.             <CheckBox Margin="5" Content="Two" />  
  6.             <CheckBox Margin="5" Content="Three" />  
  7.             <CheckBox Margin="5" Content="Four" />  
  8.         </StackPanel>  
  9.     </Expander>  
  10. </Grid>