Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9226337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:48:20+00:00 2026-06-18T04:48:20+00:00

I’m currently developing an app for Windows Phone 7.1, and need to save some

  • 0

I’m currently developing an app for Windows Phone 7.1, and need to save some data for when the user quits the app.

The app is pretty straightforward: the MainPage is the first thing the user sees, in which they select one of four shopping centers. The next page asks them where they have parked their car and stores it as a String variable. The last page loads that String variable and displays back to the user the relevant information, along with a timer that has been ongoing since launching the app.

What I want to save is the user-input data and the timer value when the user leaves the app, so that when launching it again, it automatically shows the last page with the user’s info in it.

I’ve been playing around with the generated Application_Launching, Activated, etc events, but so far can’t get something to work. Any help would be greatly appreciated.

Edit: Here’s some code that I have so far (hasn’t led me anywhere)

    void LoadSettings()
    {
        IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
        String mall;
        String level;
        String letter;
        String number;
        if (settings.TryGetValue<String>("mall", out mall))
        {
            _mall = mall;
        }
        if (settings.TryGetValue<String>("level", out level))
        {
            _level = level;
        }
        if (settings.TryGetValue<String>("mall", out letter))
        {
            _letter = letter;
        }
        if (settings.TryGetValue<String>("mall", out number))
        {
            _number = number;
        }
    }

    void SaveSettings()
    {
        IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
        if (_mall != null)
        {
            settings["mall"] = (_mall as String);
            settings["level"] = (_level as String);
            settings["letter"] = (_letter as String);
            settings["number"] = (_number as String);
        }
    }

That’s in my App.xaml.cs class

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:48:21+00:00Added an answer on June 18, 2026 at 4:48 am

    You have to look at the events in your app.cs file, but it also depends on what you want when tha application is Activated, Deactived, Closed and launched.

        // 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)
        {
             LoadSettings();
        }
    
        // 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)
        {
            if (e.IsApplicationInstancePreserved)
            {
                //The application was dormant and state was automatically preserved
            }
            else
            {
                LoadSettings();
            }
        }
    
    
        // 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)
        {
             SaveSettings();
        }
    
        // 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)
        {
            SaveSettings();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I need to clean up various Word 'smart' characters in user input, including but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need a function that will clean a strings' special characters. I do NOT

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.