GridSplitter Control needed

61 views
Skip to first unread message

Michael Sync

unread,
Nov 12, 2009, 3:03:55 AM11/12/09
to wpf-di...@googlegroups.com
Hello All,

Does anyone know the WPF grid splitter control that can be docked on button click? If I click the button (in "red" color)
, I want to move the splitter to right side as shown in picture #2. If you know any control that can provide this feature, please let me know .. Otherwise, I will have created my own one. Thanks.

 

 

 

 




--
Don't go the way life takes you.
Take life the way you go

http://michaelsync.net
image001.jpg
image002.jpg

Sacha Barber

unread,
Nov 12, 2009, 3:38:26 AM11/12/09
to wpf-di...@googlegroups.com
I am sure with a nice GridSplitter template and some MultiBinding that would be easy to achieve.
 
Simply put a button as part of the grid splitter template, have a MutiBinding that takes in the parent grid, have an attached bahvaiour for the Button which uses the values from the MutiBinding and does the docking for you

--
Sacha Barber
sacha....@gmail.com
image002.jpg
image001.jpg

Karl Shifflett

unread,
Nov 12, 2009, 8:26:49 AM11/12/09
to wpf-di...@googlegroups.com

Michael,

 

I’ve done this several times.

 

When clicked, I collapse the row/column that the splitter controls.

 

You can also get the cool Outlook collapse effect by reducing the row/column to a small fixed size and display some text.

 

One item you have to keep track of is the row/column size so when the button is clicked again (when collapsed) it will return to the same size.

 

When you do this, make sure your arrows actually point to the direction of movement.  The bottom applications points left but collapses (fully expands) to the right.

 

I can whip up an example pretty quick if you need it.  Just let me know.

 

Cheers,

 

kdawg

image001.jpg
image002.jpg

Michael Sync

unread,
Nov 12, 2009, 8:35:58 AM11/12/09
to wpf-di...@googlegroups.com
Hi Sacha and Karl,
 
 
Thanks a lot, Sacha and Karl.
 
 
Regards,
Michael Sync

image002.jpg
image001.jpg

Karl Shifflett

unread,
Nov 12, 2009, 8:46:48 AM11/12/09
to wpf-di...@googlegroups.com

Michael,

 

That code does not remember the size of the row/column when its collapsed, it always expands to the same size, regardless of the size when collapsed.

 

To make your great, add that feature in, your users will really appreciate it.

 

Karl

image001.jpg
image002.jpg

Michael Sync

unread,
Nov 12, 2009, 10:17:42 AM11/12/09
to wpf-di...@googlegroups.com
Hi Karl,
 
This is very good point. I will try to see what I can do to remember the old position of splitter. If you can whip up an example pretty quick then I would like to get it. Thanks a lot, Karl. :)  
 
Regards,
Michael Sync

image001.jpg
image002.jpg

Sacha Barber

unread,
Nov 12, 2009, 10:39:37 AM11/12/09
to wpf-di...@googlegroups.com
Can you send it to the group I have a need for that also. I could do it myself, but I is lazy.
--
Sacha Barber
sacha....@gmail.com
image001.jpg
image002.jpg

Karl Shifflett

unread,
Nov 12, 2009, 10:47:41 AM11/12/09
to wpf-di...@googlegroups.com

OK, I’ll write you a nice custom control, provide samples….(yes, I’ll do it in C# for ya)

image001.jpg
image002.jpg

Michael Sync

unread,
Nov 12, 2009, 10:48:40 AM11/12/09
to wpf-di...@googlegroups.com
Great. Thanks a lot, Karl.
image002.jpg
image001.jpg

Sacha Barber

unread,
Nov 12, 2009, 10:52:30 AM11/12/09
to wpf-di...@googlegroups.com
Whos the man, K-Dawg, he da man that's who.
--
Sacha Barber
sacha....@gmail.com
image002.jpg
image001.jpg

Karl Shifflett

unread,
Nov 12, 2009, 10:56:10 AM11/12/09
to wpf-di...@googlegroups.com

No, just trying to keep up.

image001.jpg
image002.jpg

Sacha Barber

unread,
Nov 12, 2009, 11:51:23 AM11/12/09
to wpf-di...@googlegroups.com
Come on now Karl, Just finished a call with Mark-Wilson Thomas, and he said you were the bomb.
--
Sacha Barber
sacha....@gmail.com
image002.jpg
image001.jpg
Reply all
Reply to author
Forward
0 new messages