在我的Windows Phone 8應用程序,我想保留我的應用程序的狀態,使用該link「ExecutionModelApplication」找不到(是否缺少using指令或程序集引用?)WP8 C#
而且在可見的Modifying the Page Class
的話題我修改我的MainPage
類的構造函數,並添加這一行:
(Application.Current as ExecutionModelApplication.App).ApplicationDataObjectChanged +=
new EventHandler(MainPage_ApplicationDataObjectChanged);
要我MainPage
類的構造函數一樣bwlow:
public MainPage()
{
InitializeComponent();
// Sample code to localize the ApplicationBar
//BuildLocalizedApplicationBar();
_isNewPageInstance = true;
// Set the event handler for when the application data object changes.
(Application.Current as ExecutionModelApplication.App).ApplicationDataObjectChanged +=
new EventHandler(MainPage_ApplicationDataObjectChanged);
}
但我在ExecutionModelApplication
收到以下錯誤:
The type or namespace name 'ExecutionModelApplication' could not be found (are you missing a using directive or an assembly reference?)
如何解決它,請給我建議。
等待您的答覆。
感謝