2011-07-04 10 views
0

私の携帯電話のアプリケーションには別の問題があります。windows phone 7、戻るボタンとページのヘルプ、変数の保存

私の問題は、以下の通りである。

1つのページに、私は写真のリストを持っている、ととしてマークボタン「お気に入り。」行の特定のイメージをお気に入りにする場合は、イメージの境界線が色を変えてこれを示します。

私のアプリケーションを削除したり、戻るボタンを押してそのまったく同じページに戻ると、画像の境界線がデフォルトの色に戻ります。

質問する前に、私はこれが孤立したメモリの問題であるかどうかわかりません。私は隔離されたストレージを探し始めましたが、現時点で把握することは難しいです。

これは保存状態の問題でしょうか?

いずれかの方法で、私はなど、私のアプリケーションは、ユーザーがアプリケーションや墓石、それを終了、または背面のボタンを押した時はいつでもお気に入りが何であるかを覚えていたいと思い

誰かが中にコードの一部を提供してもらえこれを手伝うために?

+0

? IsolatedStorage? IsolatedSettings? –

+0

これはちょうど、私はどちらを選ぶか分からない。お気に入りのリストの目的は、画像がお気に入りになっているかどうかを確認し、別のページにお気に入りのアイテムだけが表示されるようにすることです。 – topcoderwannabe

+0

私は隔離されたストレージムービー、ここでの質問を見てみました。 – topcoderwannabe

答えて

0

システムが基本的にあなたのアプリを殺しているので、データを保存する必要があります。だから、metodsであなたのデータを保存して読むためにあなたのapp.xaml.csに書き込みコードを必要とする:あなたが好きなリストを永続化されている

// 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) 
    { 
    } 
関連する問題