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 a IsExpanded property to get and set the expanded or collapsed state.

 

<Grid>

        <Expander Header="Select Answer">

            <StackPanel Margin="15,5,0,0">

                <CheckBox Margin="5" Content="One" />

                <CheckBox Margin="5" Content="Two" />

                <CheckBox Margin="5" Content="Three" />

                <CheckBox Margin="5" Content="Four" />

            </StackPanel>

        </Expander>

 

    </Grid>

Ebook Download
View all
Learn
View all