【发布时间】:2016-07-24 22:05:16
【问题描述】:
我需要在 Windows Phone 8 的三个页面之间传递一个简单的 texbox。我一直在四处寻找,但没有找到,我试过这个,'https://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh771188.aspx' 我在这个方法中有问题:
private void navigationHelper_LoadState(object sender, LoadStateEventArgs e)
{
string name = e.NavigationParameter as string;
if (!string.IsNullOrWhiteSpace(name))
{
tb1.Text = "Hello, " + name;
}
else
{
tb1.Text = "Name is required. Go back and enter a name.";
}
}
我找不到 LoadStateEventArgs e,缺少 using 指令或程序集引用。
【问题讨论】:
-
你用这个方法有什么问题?你有什么例外吗?您需要更具体地了解您的问题。
-
当我写方法时,Visual Studio 说我找不到命名空间名称 LoadStateEventArgs e
-
您是在编写 Windows 8 还是 Windows 8.1 应用程序? Visual Studio 2012 还是 2013??
-
Windows 8.1,视觉工作室 2013
-
嘿!我想我想帮助你!你想将文本框中的值传递到多个页面还是什么?
标签: c# wpf visual-studio-2013 windows-phone-8.1 code-behind