wpf - How to make expander expand over grid rows -


i looking answer of this, solutions i've found not working properly.
here problem. have interface,based on grid below:

 | __________________________________| |(v)expander |(v)expander  |(v)expander |  <- grid inside row of main grid |___________________________________| |                                        | |                                        | |                                        | .                                        . <- grid, stackpanel, etc. inside row .                                        . .                                        . |                                        | |___________________________________| |(^)expander  | (^) expander   |         | <- grid inside row of main grid |___________________________________| 

each expander placed on it's own border.
want expanders expand on rest of interface. top expanders expand down, bottom ones - up. can't use rowspan. should done zindex somehow guess, trying in lot , didn't work. set grids , borders panel.zindex property let's 99, , content of expander set on zindex 999.

is there way it?
thanks,
joe

after while (when have been doing sth else refresh mind on topic) found solution. based on karl shifflet solution ( http://karlshifflett.wordpress.com/2008/02/05/wpf-sample-series-expander-control-with-popup-content/ ).
placed grid holds top expanders onto canvas. set canvas panel.zindex property 99 , set background desired colour. grid.background property set transparent , width fill canvas size:

 background="transparent" width="{binding relativesource=   {relativesource mode=findancestor, ancestortype={x:type canvas}},    path=actualwidth}" 

important thing set expanders verticalalignment top, because when 1 of them expands, grid height (which should not hard defined in case) resizes, , when vertical alignment of them not set top, expanders placed in middle.

i hope helps someone.


Comments