如何使用 c# 在 WPF 中以编程方式更改 Star.xaml(全景活动)的平铺
Panorama.title.text=abc.toString();
在不使用数据绑定的情况下,我不想使用 DataBinding 让它变得复杂..
C# code for Second Activity Class
namespace Horoscope
{
public partial class Star : PhoneApplicationPage
{
public Star()
{
InitializeComponent();
}
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
string msg = "";
if (NavigationContext.QueryString.TryGetValue("msg", out msg))
{
}
}
}
}
我想用以前活动中的消息命名标题
这是 Star.xaml
<!--LayoutRoot contains the root grid where all other page content is placed-->
<Grid x:Name="LayoutRoot">
<controls:Panorama Title="my application">
<!--Panorama item one-->
<controls:PanoramaItem Header="item1">
<Grid/>
</controls:PanoramaItem>
<!--Panorama item two-->
<controls:PanoramaItem Header="item2">
<Grid/>
</controls:PanoramaItem>
</controls:Panorama>
</Grid>
<!--Panorama-based applications should not show an ApplicationBar-->