c# - Resizeable grid columns -
i have 4 panels arranged 1 column after another. each panel fixed except 3rd one, should big possible.
i want able toggle visibility of 1st, 2nd, , 4th panels.
i tried using grid , toggling different columns:
<grid grid.row="1" name="resizablepanels"> <grid.columndefinitions> <columndefinition width="40" name="gridcoltools"/> <columndefinition width="100" name="gridcolstamps"/> <columndefinition width="*" name="gridcolcanvas"/> <columndefinition width="256" name="gridcolpropertiesandlayers"/> </grid.columndefinitions> ... <grid>
but hides panels without repositioning , resizing 3rd panel.
i tried wrappanel, couldnt work because 3rd panel's size unknown.
how can toggle visibility of columns , resize appropriately?
you need make width of hideable columns "auto", , set widths (40, 100, 256) on controls contained in each grid column.
right specifying columns take size - if set them auto, third column (with width *) soak space provide when hide them.
as @blam noted, need use visibility.collapsed work - hidden won't cut here, since hidden controls still take space.
Comments
Post a Comment