WPF: Problem with overlapping controls and grid column widths -


i have problem regarding parent grid control in overlaps tabcontrol.

i need child grid (in tab control) resize columns according overlapping control. specifically, when overlapping control resized (due resize of window example) child grid inside tabcontrol needs resize columns child controls inside tabcontrol grid isn't overlapped control overlaps tabcontrol.

i sincerely hope here knows solution problem, i've been fighting days :)

thanks in advance!

best regards, req

edit: in response comments below:

absolutely - figured should have, seeing was/am @ work didn't have code handy. can write similar example of xaml.

<grid name="parentgrid" >   <grid.columndefinitions>     <columndefinition width="1*" />     <columndefinition width="1*" />     <columndefinition width="1*" />   </grid.columndefinitions>   <grid.rowdefinitions>     <rowdefinition height="1*" />     <rowdefinition height="1*" />     <rowdefinition height="1*" />   </grid.rowdefinitions>    <tabcontrol name="tabctrl" grid.column="1" grid.columnspan="2" grid.row="1" grid.rowspan="2">     <tabitem name="tabitem1">       <grid name="tabctrlgrid">         <grid.columndefinitions>           <columndefinition width="1*" /> <!-- column want resize according overlapping image control below -->           <columndefinition width="1*" />         </grid.columndefinitions>         <grid.rowdefinitions>           <rowdefinition height="1*" />           <rowdefinition height="1*" />         </grid.rowdefinitions>          <button name="somechildcontrol" grid.column="1" grid.row="0" />       </grid>     </tabitem>   </tabcontrol>    <image name="overlappingimg" grid.column="0" grid.columnspan="2" grid.row="0" grid.rowspan="2" /> <!-- whenever screen/window resized, parentgrid resizes, , resizing overlapping image. --> </grid> 

what needs happen column 0 in tabctrlgrid needs resize width fit width of overlapping area of image. way somechildcontrol never overlapped image, regardless of how it's resized.

hopefully makes little more clear :)

how look?

    <grid name="parentgrid" background="lightgray">         <grid.columndefinitions>             <columndefinition width="100" />             <columndefinition width="*"/>             <columndefinition width="100" />         </grid.columndefinitions>         <rectangle horizontalalignment="stretch" verticalalignment="stretch" fill="aqua"/>         <textblock text="tab controller" horizontalalignment="stretch" verticalalignment="bottom"/>         <rectangle grid.column="2" horizontalalignment="stretch" verticalalignment="stretch" fill="aqua"/>         <textblock text="up down nav" grid.column="2" horizontalalignment="stretch" verticalalignment="stretch"/>         <grid grid.columnspan="2">             <grid.columndefinitions>                 <columndefinition width="auto" />                 <columndefinition width="*"/>             </grid.columndefinitions>             <rectangle horizontalalignment="left" verticalalignment="top" width="130" height="160" fill="blanchedalmond"/>             <textblock text="coverart" horizontalalignment="left" verticalalignment="top" width="130" height="160"/>             <rectangle grid.column="1" fill="lightgray" />             <textblock text="tab content" grid.column="1" />         </grid>     </grid> 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -