[英]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.