How to create a collapsible panel in WPF

user301016 picture user301016 · Aug 20, 2009 · Viewed 40.3k times · Source

I am creating a Windows application (WPF) and C#. In my view, I have to add few layouts like browsing a folder, displaying the files in the folder in a list view...etc

My requirement is : The panels mentioned above should be collapsible panels, I guess, we dont have option of collapsible panel in wpf.

I have to create a custom control for this? If so, Please suggest me how to do this?

Answer

Bojan Resnik picture Bojan Resnik · Aug 20, 2009

The Expander control may be what you are looking for. From MSDN:

Expander Class

Represents the control that displays a header that has a collapsible window that displays content.