caliburn.micro - WPF resize issues when using RowDefinition Height="*" in Grid -


update added usercontrol definition xaml.

i've noticed strange behavior in couple of wpf applications i've created lately, seem related using "*" grid row height or column width.

the behavior i'm referring when trying expand items in control (like treeview), entire window resize height instead of creating scrollbar. if run application, , start expanding nodes, when items extend beyond visible portion of ui window resize.

but if resize window first, or even click on bottom or right border (without resizing), behave , leave window height alone, scrollbar on treeview.

<usercontrol x:class="projectz.views.genericdefinitionview"              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"               xmlns:d="http://schemas.microsoft.com/expression/blend/2008"               xmlns:cal="http://www.caliburnproject.org"              xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"              xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"                              xmlns:local="clr-namespace:projectz"              xmlns:behaviors="clr-namespace:projectz.behaviors"              mc:ignorable="d" d:designheight="600" d:designwidth="600">     <grid>         <grid.rowdefinitions>             <rowdefinition height="20" />             <rowdefinition height="*" />         </grid.rowdefinitions>         <menu grid.row="0" name="mnumainmenu" ismainmenu="true">             ... menu stuff         </menu>         <xcad:dockingmanager ... />     </grid> </usercontrol> 

i've played around , seems start happening after i've used "*" value grid row height or column width. if take out, seems behave normally.

has else run this? ideas i'm doing wrong or differently fix this? other information think might relevant using caliburn.micro. settings passed window when launching are: minheight, minwidth, title, , icon.

the problem never specify height in visual tree above element.

your usercontrol or window that's created needs specific height if want use star sizing effectively. otherwise, height "chosen" @ runtime, window set size content. change items, window resizes.

as touch border, height being set (whether or not resize), in case dictates layout correctly.

if specify default height window created, issue resolve itself.


Comments