我正在开发一个具有全景页面的 Windows Phone 7.1 应用程序。
这个全景页面有两个全景项目,一个带有两个文本块,另一个带有 bing 地图控件。我还设置了一个 1,5MB 的图像作为全景控制背景。
这是全景的 XAML:
<phone:PhoneApplicationPage
x:Class="XxXClass.DemoDetail"
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:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="False" Foreground="{x:Null}" xmlns:my="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps">
<toolkit:TransitionService.NavigationInTransition>
<toolkit:NavigationInTransition>
<toolkit:NavigationInTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardIn"/>
</toolkit:NavigationInTransition.Backward>
<toolkit:NavigationInTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardIn"/>
</toolkit:NavigationInTransition.Forward>
</toolkit:NavigationInTransition>
</toolkit:TransitionService.NavigationInTransition>
<toolkit:TransitionService.NavigationOutTransition>
<toolkit:NavigationOutTransition>
<toolkit:NavigationOutTransition.Backward>
<toolkit:TurnstileTransition Mode="BackwardOut"/>
</toolkit:NavigationOutTransition.Backward>
<toolkit:NavigationOutTransition.Forward>
<toolkit:TurnstileTransition Mode="ForwardOut"/>
</toolkit:NavigationOutTransition.Forward>
</toolkit:NavigationOutTransition>
</toolkit:TransitionService.NavigationOutTransition>
<!--LayoutRoot contains the root grid where all other page content is placed-->
<Grid x:Name="LayoutRoot">
<controls:Panorama Title="Demonstation Tracker">
<controls:Panorama.Background>
<ImageBrush Stretch="Fill" ImageSource="/Images/demonstrationPanorama.png"/>
</controls:Panorama.Background>
<!--Panorama item one-->
<controls:PanoramaItem Header="Details">
<Grid Background="#73000000" Margin="0,0,0,26">
<TextBlock Height="42" Margin="8,8,174,0" TextWrapping="Wrap" Text="XXXX" VerticalAlignment="Top" FontSize="{StaticResource PhoneFontSizeLarge}"/>
<TextBlock Margin="8,54,8,8" TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" Height="413" Width="381" FontSize="{StaticResource PhoneFontSizeMedium}"><Run Text="xxx."/><Run Text=".."/></TextBlock>
</Grid>
</controls:PanoramaItem>
<!--Panorama item two-->
<controls:PanoramaItem Header="Map">
<Grid>
<my:Map Name="map1" Margin="0,0,0,26" Height="420" Width="420" />
</Grid>
</controls:PanoramaItem>
</controls:Panorama>
</Grid>
<!--Panorama-based applications should not show an ApplicationBar-->
</phone:PhoneApplicationPage>
我第一次导航到全景页面时显示时间过长,如果我点击后退按钮并返回它,它会加载得更快。
如何使全景页面加载更快?