windows phone 7 - Why does the web browser size grow when i tilt it? -


i working windows phone app in visual studio have web browser in it. have problem layout. app starts in portrait , looks good. web browser fills whole screen. when tilt phone landscape-mode web-browser bigger , have scroll lot bottom of page. don't want big, want fill screen.

here code:

<phone:phoneapplicationpage  x:class="phoneapp1.mainpage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:microsoft.phone.controls;assembly=microsoft.phone" xmlns:shell="clr-namespace:microsoft.phone.shell;assembly=microsoft.phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:ignorable="d" fontfamily="{staticresource phonefontfamilynormal}" fontsize="{staticresource phonefontsizenormal}" foreground="{staticresource phoneforegroundbrush}" supportedorientations="portraitorlandscape" orientation="portrait" shell:systemtray.isvisible="true">  <!--layoutroot root grid page content placed--> <grid x:name="layoutroot" background="transparent">     <grid.rowdefinitions>         <rowdefinition height="auto"/>         <rowdefinition height="*"/>     </grid.rowdefinitions>      <!-- localization note:         localize displayed strings copy values appropriately named         keys in app's neutral language resource file (appresources.resx)         replace hard-coded text value between attributes' quotation marks         binding clause path points string name.          example:              text="{binding path=localizedresources.applicationtitle, source={staticresource localizedstrings}}"          binding points template's string resource named "applicationtitle".          adding supported languages in project properties tab create         new resx file per language can carry translated values of         ui strings. binding in these examples cause value of         attributes drawn .resx file matches         currentuiculture of app @ run time.      -->      <!--titlepanel contains name of application , page title-->     <stackpanel grid.row="0" margin="12,17,0,28"/>      <!--contentpanel - place additional content here-->     <grid x:name="contentpanel" grid.row="1" margin="12,0,12,0">         <phone:webbrowser horizontalalignment="stretch" margin="10,10,10,10" verticalalignment="stretch" height="auto" width="auto" source="http://www.google.se" isscriptenabled="true"/>      </grid>      <!--uncomment see alignment grid ensure controls         aligned on common boundaries.  image has top margin of -32px         account system tray. set 0 (or remove margin altogether)         if system tray hidden.          before shipping remove xaml , image itself.-->     <!--<image source="/assets/alignmentgrid.png" verticalalignment="top" height="800" width="480" margin="0,-32,0,0" grid.row="0" grid.rowspan="2" ishittestvisible="false" />--> </grid> 


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -