C# WPF Grid Rows height stretch -




i trying create wpf view grows dynamically window size. example code shows three.

the first 1 shall fixed height.

the second , third 1 shall same size , whole window.

unfortunatelly not work. doing wrong? dockpanel correct tool purpose?

<grid >     <grid.rowdefinitions>         <rowdefinition height="200"/>         <rowdefinition height="1*"/>         <rowdefinition height="1*"/>     </grid.rowdefinitions>      <dockpanel grid.row="0">         <!-- labels , buttons -->     </dockpanel>      <dockpanel grid.row="1">         <listview margin="5"/>     </dockpanel>      <dockpanel grid.row="2">         <listview margin="5"/>     </dockpanel> </grid> 

because information not possible put in comment.

your layout still want do. set background colors show it. me easy trick check if layout expands want to.

<grid>     <grid.rowdefinitions>         <rowdefinition height="200" />         <rowdefinition height="1*" />         <rowdefinition height="1*" />     </grid.rowdefinitions>      <dockpanel grid.row="0"                background="yellow">         <!-- labels , buttons -->     </dockpanel>      <dockpanel grid.row="1"                background="aqua">         <listview margin="5"                   background="gray" />     </dockpanel>      <dockpanel grid.row="2"                background="beige">         <listview margin="5"                   background="bisque" />     </dockpanel> </grid> 

example

if don't see data in listview it's not because of layout. have check bindings.

hint

i recommend using border or grid instead of dockpanel in case because don't need features dockpanel provides.





wiki

Comments

Popular posts from this blog

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -

Asterisk AGI Python Script to Dialplan does not work -