c# - Adjust application controls to fit window size -
c# - Adjust application controls to fit window size -
i need adjust height of controls: trvmenu, stackpanel (grid.column="1"), stackpanel(grid.column="3"), , height+width of: tabcontrol (width what's left). need them fit size of window of application when it's running,  total screen, example. here's xaml:
<window x:class="diagramdesigner.window1"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     ...                     <treeview name="trvmenu" horizontalalignment="left" height="312"                           ...                                                                        </treeview>                 ...                     <stackpanel grid.column="1">                         ...                     </stackpanel>                 </border>                 ...                 <tabcontrol x:name="tabcontrol" grid.column="2" selectionchanged="tabdynamic_selectionchanged" itemssource="{binding}">                     ...                 </tabcontrol>                 <stackpanel  grid.column="3">                 ...                 </stackpanel>             ...         
the reply first build grid according construction of application, , each column or row need adjusted window size should have:
<grid.rowdefinitions>         ...         <rowdefinition height="*" />         ... </grid.rowdefinitions>    and
<grid.columndefinitions>        ...        <columndefinition width="*"/>        ... </grid.columndefinitions>        c# wpf 
 
Comments
Post a Comment