GridSplitter with button for pinning like behavior
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 wo开发者_StackOverflown'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?
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.
精彩评论