windowsphone中的Android片段模拟
我想在WindowsPhone8应用程序中使用类似Android片段的东西 描述:在我的一个页面中,如果用户未经授权,我想更改全景项目内容。你将如何解决这个问题windowsphone中的Android片段模拟,android,windows-phone-7,windows-phone-8,Android,Windows Phone 7,Windows Phone 8,我想在WindowsPhone8应用程序中使用类似Android片段的东西 描述:在我的一个页面中,如果用户未经授权,我想更改全景项目内容。你将如何解决这个问题 在Android中,我只需将另一个片段加载到panorama项目视图中,但我对WP的使用经验不多,也不知道相同问题的最佳实践。如果不知道该特定项目将包含什么,我可能会在该panorama项目中声明两个不同的UI <Grid x:Name="_Authorised" Visibility="Collapsed"> &l
在Android中,我只需将另一个片段加载到panorama项目视图中,但我对WP的使用经验不多,也不知道相同问题的最佳实践。如果不知道该特定项目将包含什么,我可能会在该panorama项目中声明两个不同的UI
<Grid x:Name="_Authorised" Visibility="Collapsed">
<!-- Put all UI stuff here that will show when authorised -->
</Grid>
<Grid x:Name="_NotAuthorised" Visibility="Visible">
<!-- Put all UI stuff here that will show when authorised -->
</Grid>
protected override void OnNavigatedTo(NavigationEventArgs e)
{
if (UserIsAuthorised)
{
_NotAuthorised.Visibity = Visibility.Collapsed;
_Authorised.Visibility = Visibility.Visible;
}
}