c# - MinWidth, MaxWidth, MinHeight, MaxHeight don't have effect for <UserControl> -


i'm learning create wpf application caliburn micro framework.

following tutorial on homepage: basic configuration, removed default generated <window> xaml, instead, have <usercontrol> xaml , bootstrap via appboostrapper.

here mainview.xaml:

<usercontrol x:class="smartrenamer.views.mainview"              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"               mc:ignorable="d"               d:designheight="300" d:designwidth="300"              minheight="300"              minwidth="300"              maxheight="500"              maxwidth="1000">     <grid>         <grid.rowdefinitions>             <rowdefinition height="auto" />             <rowdefinition height="*" />         </grid.rowdefinitions>         <menu ismainmenu="true" grid.row="0">             <menuitem header="_file">                 <menuitem header="_open folder..." x:name="openfolder"></menuitem>             </menuitem>             <menuitem header="_about" />         </menu>         <scrollviewer horizontalscrollbarvisibility="visible" grid.row="1" maxheight="500" maxwidth="1000">             <stackpanel>                 <datagrid x:name="fileslist">                  </datagrid>             </stackpanel>         </scrollviewer>     </grid> </usercontrol> 

the problem want set minwidth, maxwidth, minheight, maxheight application, seems configuration in mainwindow.xaml isn't working.

here 2 screenshots, window still can re-sized out of defined range:

very small window very big window wrong here?


Comments