【发布时间】:2014-12-24 14:35:17
【问题描述】:
我正在从 WP 8.1 应用程序中调用 ContentDialog,该应用程序从用户那里收集数据并将其写入应用程序数据。
然后我从 Application Data 中重新读取变量并将它们显示在父级的 GUI 中。
private void Settings_Click(object sender, RoutedEventArgs e)
{
new AppSettings(); // Open dialog
dataInit(); // Re-read the data from AppData
guiInit(); // Populate GUI /w new data
}
由于某种原因,在我用新数据关闭 ContentDialog 后,GUI 没有刷新。如果我打开 ContentDialog 并再次关闭它,无论我是否修改任何数据,它都会刷新。
我觉得 ContentDialog 是异步运行的,但据我所知,打开它会阻止执行,因为它在同一个线程中运行。有什么想法吗?
【问题讨论】:
标签: c# windows-phone-8.1