如何在WPF中创建可折叠面板 [英] How to create a collapsible panel in WPF

查看:1164
本文介绍了如何在WPF中创建可折叠面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建Windows应用程序(WPF)和C#.在我看来,我必须添加一些布局,例如浏览文件夹,以列表视图显示该文件夹中的文件...等

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

我的要求是: 上面提到的面板应该是可折叠面板,我想,在wpf中我们没有可折叠面板的选项.

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?

推荐答案

Expander控件可能就是您想要的.来自 MSDN :

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

扩展器类

表示显示标题的控件,该标题具有可折叠的窗口,用于显示内容.

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

这篇关于如何在WPF中创建可折叠面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆