C# windows phone 7,有关后退按钮和页面的帮助,保存变量

C# windows phone 7,有关后退按钮和页面的帮助,保存变量,c#,image,variables,windows-phone-7,C#,Image,Variables,Windows Phone 7,我的手机申请还有一个问题 我的问题如下: 在一个页面上,我有一个图片列表和一个标记为“收藏”的按钮。如果您要收藏行中的特定图像,图像的边框会改变颜色以表示这一点 但是,每当我删除我的应用程序或点击后退按钮返回到同一页面时,图像的边框都会恢复为默认颜色 在你提问之前,我不知道这是否是一个孤立的记忆问题。我刚刚开始研究孤立的存储,现在很难理解 也许这是一个拯救国家的问题 无论哪种方式,我都希望我的应用程序在用户退出应用程序或删除它、或点击后退按钮等时记住收藏夹是什么 有人能提供一段代码来帮助你吗?你

我的手机申请还有一个问题

我的问题如下:

在一个页面上,我有一个图片列表和一个标记为“收藏”的按钮。如果您要收藏行中的特定图像,图像的边框会改变颜色以表示这一点

但是,每当我删除我的应用程序或点击后退按钮返回到同一页面时,图像的边框都会恢复为默认颜色

在你提问之前,我不知道这是否是一个孤立的记忆问题。我刚刚开始研究孤立的存储,现在很难理解

也许这是一个拯救国家的问题

无论哪种方式,我都希望我的应用程序在用户退出应用程序或删除它、或点击后退按钮等时记住收藏夹是什么


有人能提供一段代码来帮助你吗?

你需要保存你的数据,因为系统基本上正在杀死你的应用程序。因此,您需要在app.xaml.cs中编写代码,以便在metods中保存和读取数据:

    // Code to execute when the application is launching (eg, from Start)
    // This code will not execute when the application is reactivated
    private void Application_Launching(object sender, LaunchingEventArgs e)
    {
    }

    // Code to execute when the application is activated (brought to foreground)
    // This code will not execute when the application is first launched
    private void Application_Activated(object sender, ActivatedEventArgs e)
    {
    }

    // Code to execute when the application is deactivated (sent to background)
    // This code will not execute when the application is closing
    private void Application_Deactivated(object sender, DeactivatedEventArgs e)
    {
    }

    // Code to execute when the application is closing (eg, user hit Back)
    // This code will not execute when the application is deactivated
    private void Application_Closing(object sender, ClosingEventArgs e)
    {
    }

您将收藏列表保存在哪里?隔离存储?隔离设置?就是这样,我甚至不知道该选哪个。收藏夹列表的目标是传递图像是否受欢迎,然后在另一个页面上只显示那些受欢迎的项目。我尝试查看独立存储电影,这里有问题,这只会让我更加困惑。