.net - what is wrong with stretching of my usercontrol -


i want picture comes usercontrol stratch on yellow background , not in thin line there .

i have stretched every possible thing there still have problem

my main window

<window x:class="dbtool.mainwindow"     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"     xmlns:view="clr-namespace:dbtool.view"     xmlns:viewmodel="clr-namespace:dbtool.viewmodel"     title="mainwindow" height="332" width="528"  >  <window.resources>     <!-- these 4 templates map viewmodel view. -->     <datatemplate datatype="{x:type viewmodel:selectdatabaseviewmodel}">         <view:selectdatabase />     </datatemplate>      <datatemplate datatype="{x:type viewmodel:mysqlpageviewmodel}">         <view:mysqlpageview />     </datatemplate>  </window.resources>    <grid showgridlines="true" horizontalalignment="stretch" >         <grid.rowdefinitions>             <rowdefinition height="auto"/>             <rowdefinition height="*" />             <rowdefinition height="auto"/>         </grid.rowdefinitions>      <toolbar  grid.row = "0" height="26" horizontalalignment="stretch" verticalalignment="top" name="toolbar1"  width="auto" dockpanel.dock="top"  />     <!-- <view:selectdatabase x:name="detailview"/>-->        <grid  verticalalignment="bottom" grid.row = "2"  horizontalalignment="stretch">             <grid.rowdefinitions>                 <rowdefinition/>             </grid.rowdefinitions>              <grid.columndefinitions>                 <columndefinition/>                 <columndefinition/>                 <columndefinition/>                 <columndefinition/>                 <columndefinition/>             </grid.columndefinitions>              <button grid.row="0" grid.column="4" background="azure" margin="10"   command="{binding path=movenextcommand}" >next</button>              <button grid.row="0" grid.column="3" background="azure" margin="10" command="{binding path=movepreviouscommand}">previous</button>          </grid>         <border background="yellow" grid.row = "1">              <headeredcontentcontrol verticalalignment="stretch" verticalcontentalignment="stretch" content="{binding path=currentpage}" header="{binding path=currentpage.displayname}" />         </border>     </grid>        

the user control

<usercontrol x:class="dbtool.view.selectdatabase"          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" verticalcontentalignment="stretch"          verticalalignment="stretch" d:designheight="300" d:designwidth="300" >  <usercontrol.background  >     <imagebrush  stretch="uniformtofill" imagesource="..\resources\dbselection.jpg" ></imagebrush > </usercontrol.background >  <grid verticalalignment="stretch">     <!--<radiobutton content="mysql" height="16" horizontalalignment="left" margin="36,112,0,0" name="radiobutton1" verticalalignment="top" />     <radiobutton content="mssql" height="16" horizontalalignment="left" margin="36,134,0,0" name="radiobutton2" verticalalignment="top" />-->     <itemscontrol fontweight="normal" itemssource="{binding path=availablebeantypes}">         <itemscontrol.itemtemplate>             <datatemplate>                 <radiobutton content="{binding path=displayname}" ischecked="{binding path=isselected}" groupname="beantype" margin="2,3.5"/>             </datatemplate>         </itemscontrol.itemtemplate>     </itemscontrol>  </grid> 

will glad , cannot solve out :-(

my code

since headeredcontentcontrol not explicitly set height defaults auto defined grid height in user control. , because not set set size of itemscontrol, in case height of 2 radio buttons. fix must explicitly set height of itemscontrol.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -