问题描述
我有一个窗口,里面有很多内容.我希望能够使用面板分隔内容,并有一个分隔符,用户可以单击每个面板之间的切换(带有从左到右移动分隔符的动画,显示一个部分并隐藏另一个部分).想想 Microsoft Office (2007) 导航窗格.有没有简单的方法来实现这一点?
I have a window that has a lot of content. I'd like to be able to separate the content using panels, and have a separator that the user can click on the toggle between each panel (with an animation that moves the separator from left to right, showing one section and hiding the other). Think of the Microsoft Office (2007) navigation pane. Is there an easy way to accomplish this?
谢谢!
推荐答案
我认为您正在寻找的是手风琴"控件,这里有一篇关于如何从一堆 Expander 控件中构建一个控件的帖子:
I think what you are looking for is an "Accordion" control, here is a post abotu how to build one from a stack of Expander controls:
http://www.rooijakkers.net/Blog/post/2007/11/WPF-implementation-of-a-basic-Accordion-control.aspx
对于动画,请查看 http://Kevin 的 bag-o-tricks 中的Reveal"控件j832.com/bagotricks/
我认为甚至还有一个基于示例项目中的 Reveal 控件的动画扩展器控件模板.
I think there's even an animated Expander control template based on the Reveal control in the sample project.
这篇关于是否有 WPF 控件可用于展开/折叠面板(动画)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!