Windows phone 7 Bing地图覆盖了标题面板!为什么?
我在scrollviewer中放置了一个地图控件,但当我打开地图控件时,地图控件覆盖了标题板!喜欢这张照片吗 如何修复?这是一个系统错误吗?谢谢~~~ 这是我的xaml代码Windows phone 7 Bing地图覆盖了标题面板!为什么?,windows-phone-7,Windows Phone 7,我在scrollviewer中放置了一个地图控件,但当我打开地图控件时,地图控件覆盖了标题板!喜欢这张照片吗 如何修复?这是一个系统错误吗?谢谢~~~ 这是我的xaml代码 <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition H
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel 包含應用程式的名稱和頁面標題-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="我的應用程式" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="頁面名稱" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - 其他內容置於此-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ScrollViewer>
<Grid Width="440" Height="258" VerticalAlignment="Top">
<msMap:Map x:Name="Map" CopyrightVisibility="Collapsed" LogoVisibility="Collapsed" ScaleVisibility="Collapsed" CredentialsProvider="Al1klJ_w8MPrZ0kntZyMogTJkXb79xyNKVC2XpJuwSPp0NmAbrIuAthSzs5xbomJ">
</msMap:Map>
</Grid>
</ScrollViewer>
</Grid>
</Grid>
您的网格页边距肯定存在一些问题。如果粘贴
xaml
代码。也许我会以更好的方式帮助你
[更新]
试试看:这对我有用
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ScrollViewer>
<Grid MaxHeight="400" VerticalAlignment="Top">
<my:Map HorizontalAlignment="Stretch" Name="map1" VerticalAlignment="Stretch" />
</Grid>
</ScrollViewer>
</Grid>
</Grid>
您的网格页边距肯定存在一些问题。如果粘贴
xaml
代码。也许我会以更好的方式帮助你
[更新]
试试看:这对我有用
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock x:Name="ApplicationTitle" Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}"/>
<TextBlock x:Name="PageTitle" Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ScrollViewer>
<Grid MaxHeight="400" VerticalAlignment="Top">
<my:Map HorizontalAlignment="Stretch" Name="map1" VerticalAlignment="Stretch" />
</Grid>
</ScrollViewer>
</Grid>
</Grid>
即使您的代码也能正常工作。使用scrollviewer。我没有发现xaml中有任何错误。但我不明白它是如何对我起作用的,而对你却不起作用。你需要在scrollviewer中放置一个scrollviewer,并在此scrollviewer中添加一个MapControl。你的xaml代码没有scrollviewer~更新了我的答案。我发布的代码不会发生这种情况,甚至你的代码也在工作。使用scrollviewer。我没有发现xaml中有任何错误。但我不明白它是如何对我起作用的,而对你却不起作用。你需要在scrollviewer中放置一个scrollviewer,并在此scrollviewer中添加一个MapControl。你的xaml代码没有scrollviewer~更新了我的答案。对于我发布的代码来说,这是不可能的。