c# - Xaml Scrollviewer not showing the full Grid content -
i made product page scrollviewer not show in grid. have feeling has row definitions hope can me xaml:
<page background="{themeresource applicationpagebackgroundthemebrush}" height="729.552"> <page.resources> </page.resources> <grid x:name="layoutroot" d:datacontext="{d:designdata /sampledata/rootobjectsampledata2.xaml}" horizontalalignment="left" verticalalignment="top"> <grid.childrentransitions> <transitioncollection> <entrancethemetransition/> </transitioncollection> </grid.childrentransitions> <!--todo: content should placed within following grid--> <grid x:name="contentpanel" horizontalalignment="left" verticalalignment="top"> <pivot x:name="producthub" horizontalalignment="left" verticalalignment="top"> <pivotitem x:name="productpivot" header="item" datacontext="{binding}" horizontalalignment="left" verticalalignment="top" height="680"> <scrollviewer width="336" height="670" horizontalalignment="left" verticalalignment="top" > <grid x:name="contentgrid" height="auto" margin="0"> <grid.rowdefinitions> <rowdefinition height="auto" minheight="278"/> <rowdefinition height="30*"/> <rowdefinition height="auto" minheight="251"/> <rowdefinition height="77*"/> <rowdefinition height="34*"/> </grid.rowdefinitions> <textblock x:name="tblocktitle" horizontalalignment="left" margin="10,10,0,0" textwrapping="wrap" text="{binding result.item.title}" verticalalignment="top" height="20" d:datacontext="{d:designdata /sampledata/rootobjectsampledata.xaml}"/> <image x:name="imageproduct" horizontalalignment="left" height="160" margin="10,49,0,0" verticalalignment="top" width="316" stretch="fill" source="{binding result.item.images.item330}" tapped="imgproduct_click" /> <textblock x:name="btnfavorite" horizontalalignment="left" margin="10,214,0,0" textwrapping="wrap" text="" verticalalignment="top" fontfamily="segoe mdl2 assets" fontsize="20" height="20" width="20" /> <textblock x:name="tblockhiddenseo" horizontalalignment="left" margin="298,10,-6,0" textwrapping="wrap" text="{binding result.item.seo_name}" verticalalignment="top" opacity="0" height="40" width="44"/> <textblock x:name="textblockcurrency" horizontalalignment="left" margin="192,218,0,0" textwrapping="wrap" text="{binding result.item.currency_symbol}" verticalalignment="top" height="20" width="8"/> <textblock x:name="textblockprice" horizontalalignment="left" margin="205,218,0,0" textwrapping="wrap" text="{binding result.item.price}" verticalalignment="top" height="20" width="28"/> <textblock x:name="textblocklookammount" horizontalalignment="left" margin="10,258,0,0" textwrapping="wrap" text="{binding result.item.views}" verticalalignment="top" height="20" width="16" d:datacontext="{d:designdata /sampledata/rootobjectsampledata.xaml}"/> <textblock x:name="textblockwatchedtext" horizontalalignment="left" margin="31,258,0,0" textwrapping="wrap" text="x bekeken sinds" verticalalignment="top" height="20" width="105"/> <textblock x:name="textblockdate" horizontalalignment="left" margin="141,258,0,0" textwrapping="wrap" text="{binding result.item.placed}" verticalalignment="top" height="20" width="81" d:datacontext="{d:designdata /sampledata/rootobjectsampledata.xaml}"/> <stackpanel x:name="stpaneluser" grid.row="1" margin="0,10,0,20"/> <textblock x:name="textblockdescription" horizontalalignment="left" margin="10,10,0,0" textwrapping="wrap" text="{binding result.item.description}" verticalalignment="top" width="316" grid.row="1"/> <textblock x:name="textblockshipping" horizontalalignment="left" margin="10,1,0,0" grid.row="2" textwrapping="wrap" text="shipping" verticalalignment="top" height="20" width="59"/> <textblock x:name="textblockstate" horizontalalignment="left" margin="10,26,0,0" grid.row="2" textwrapping="wrap" text="state" verticalalignment="top" height="20" width="59"/> </grid> </scrollviewer> </pivotitem> </pivot> </grid> <progressring horizontalalignment="left" verticalalignment="top" x:name="progressring"/> </grid>
thank you
i'm pretty sure, parent element of scrollviewer has smaller height scrollviewer - height of scrollviewer sets height of control, not heigh of content...
as consequence, if scrollviewer 200px greater parent control - last 200px of scrollviewer cut off
Comments
Post a Comment