带有用于固定类似行为的按钮的 GridSplitter
我希望以某种方式扩展 GridSplitter 以添加一个按钮,单击该按钮会将控件展开或折叠到拆分器的指定一侧之一。
我发现 适用于 Silverlight 4 的解决方案,但我需要它适用于 .NET 3.5 中的标准 WPF,这意味着 GridSplitter 不会实现 Shemesh 解决方案中使用的视觉状态管理器内容。除了它不适用于 .NET 3.5 中的 WPF 之外,我认为 Shemesh 的解决方案可能正是我正在寻找的解决方案,它具有平滑的动画过渡,并在从折叠状态展开时记住上次展开的大小。
有人有在常规 WPF 中完成此操作的任何示例吗?
I'm looking to extend the GridSplitter in some way to add a button which when click expands or collapses the control to one of the specified sides of the splitter.
I've found a solution that works for Silverlight 4 but I need this to work for standard WPF in .NET 3.5 which means that the GridSplitter doesn't implement the Visual State Manager stuff that is used in Shemesh's solution. Other than it won't work for WPF in .NET 3.5 I think Shemesh's solutions is probably exactly what I'm looking for with smooth animated transitions and remembering the last expanded size upon expanding from a collapsed state.
Anybody have any examples of this being done in regular WPF?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我已经对 Silverlight 示例 进行了足够的修改获取适用于 .NET 3.5 SP1 的内容以及适用于 Visual State Manager 内容的 WPF Toolkit 二月版本。您可以在下面找到我已经修复、重构和重新组织的两个主要源文件。
该解决方案太大,无法在 StackOverflow 上发布,因此请参阅 我的博客文章 其中包含您需要的代码片段。
Ok, I've tinkered with the Silverlight example enough to get something working for .NET 3.5 SP1 and the WPF Toolkit February release for the Visual State Manager stuff. Below you can find the two main source files that I've fixed, refactored, and reorganized quite a bit.
The solution is to big to post on StackOverflow so please see my blog post that has the code snippets you will need.