Blejwi
Blejwi

Reputation: 1035

C# collapsible listview WPF

Can anyone tell me how to achieve something like this in WPF: img

Is this listview or gridview or maybe something else? I'm noob at C# so thanks for any help.

Upvotes: 1

Views: 708

Answers (1)

Kory Gill
Kory Gill

Reputation: 7161

This is called an Expander. You can use it like this:

<Expander Header="More Options">
    <StackPanel Margin="10,4,0,0">
        <CheckBox Margin="4" Content="Option 1" />
        <CheckBox Margin="4" Content="Option 2" />
        <CheckBox Margin="4" Content="Option 3" />
    </StackPanel>
</Expander>

See this for more info.

To answer the question in your comment, search on wpf listview example expander and check out the Images and the Web results to best inspire on what you want to do in your app. Plenty of examples will show you how to create object and bind them to the list/collection and show in a ListView/GridView possibly with grouping.

Upvotes: 2

Related Questions