GridSplitter与键钉扎样行为 [英] GridSplitter with button for pinning like behavior

查看:184
本文介绍了GridSplitter与键钉扎样行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找延长GridSplitter以某种方式加入一个按钮,当点击展开或折叠控制到分离器的指定一侧。

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.

我发现<一href="http://shemesh.word$p$pss.com/2010/07/10/silverlight-gridsplitter-with-a-collapse%C2%A0button-%E2%80%93-best/"相对=nofollow>的解决方案能为Silverlight 4 的,但我想这能在.NET 3.5工作标准WPF这意味着GridSplitter未实现所使用的示麦的解决方案的视觉状态管理器的东西。除了它不会为WPF在.NET 3.5中,我认为示麦的解决方案可能是我在寻找什么用流畅的动画过渡,并在从折叠状态展开记住最后一次展开的大小。

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.

任何人有任何这例子被经常WPF做?

Anybody have any examples of this being done in regular WPF?

推荐答案

好吧,我已经修补了的 Silverlight的例子的足以让工作的.NET 3.5 SP1和WPF工具包2月发布的视觉状态管理器的东西的东西。下面你可以看到,我已经修复,重构和重组两个主要的源文件相当多。

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.

解决方案是大张贴在StackOverflow的,请参阅我的博客文章具有code段,你将需要。

The solution is to big to post on StackOverflow so please see my blog post that has the code snippets you will need.

这篇关于GridSplitter与键钉扎样行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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