[英]How to auto adjust WebBrowser control height in Windows Phone 7?
[英]Windows Phone WebBrowser Control Not Rotating, Height Not 100%
我正在构建我的第一个简单的Windows Phone应用程序。 我虽然遇到了一些麻烦。
我正在使用WebBrowser控件来显示我无法控制的网页。
出于某种原因,控件不会随手机一起旋转。
我完全不知道为什么。
我不能让高度成为手机的100%。 如果我将它设置为auto,我认为它将被执行为0。
谁能帮我这个?
这是一个非常简单的应用程序的XAML,它只包含一个WebBrowser控件。 它是全尺寸并旋转。 你可以与你的应用程序进行比较,发现有什么不同吗? 顺便说一句,我在元素上改变的唯一属性是@SupportedOrientations的值。
<phone:PhoneApplicationPage
x:Class="WP7WebBrowser.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" d:DesignWidth="480" d:DesignHeight="768"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="PortraitOrLandscape" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<Grid x:Name="LayoutRoot" Background="Transparent">
<phone:WebBrowser Source="http://www.bing.com"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" />
</Grid>
</phone:PhoneApplicationPage>
希望能让你走上正确的道路!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.