0
您好,我正在使用windows phone 8.1 [RT]应用程序,我只是简单地浏览页面。但我发现,我们可以在XAML中使用Frame
也是这样在Windows Phone 8.1中导航的最佳实践[RT] xaml
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="120"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Background="White">
</Border>
<Button Content="next" Click="Button_Click" Background="Black" />
<Grid Grid.Row="1">
<Frame x:Name="Page1Frame" Background="Black" >
<StackPanel>
<Rectangle Height="100" Width="100" Fill="Red" Margin="5" />
<Rectangle Height="100" Width="100" Fill="Red" Margin="5" />
<Rectangle Height="100" Width="100" Fill="Red" Margin="5" />
<Rectangle Height="100" Width="100" Fill="Red" Margin="5" />
</StackPanel>
</Frame>
</Grid>
</Grid>
和浏览此帧像这样
private void Button_Click(object sender, RoutedEventArgs e)
{
Page1Frame.Navigate(typeof(BlankPage1));
}
在这个例子中我120身高电网保持相同,只是导航帧新的选项。 我只想知道哪个是最佳实践使用? 谢谢。