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 6686641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:11:42+00:00 2026-05-26T05:11:42+00:00

I currently have a Checkbox under my settings.xaml page, which the users is to

  • 0

I currently have a Checkbox under my settings.xaml page, which the users is to click to allow location services.

private void cbLocationAllow_Checked(object sender, RoutedEventArgs e)
{
    MessageBox.Show("Location Services is now enabled");
}

private void cbLocationAllow_Unchecked(object sender, RoutedEventArgs e)
{
    MessageBox.Show("Location Services is now disabled");
}

I have location aware bing map on the my MainPage which I would like to have check the status of the checkbox on settings.xaml before finding location.

I assume it would a condition if else, but im not quite sure how to implement this as the checkbox is on another page.

The below code was suggested to me, but I am getting errors on

Settings.SetSetting("allowLocation",true);

On settings page:

cbLocationAllowChecked(...)
{
Settings.SetSetting("allowLocation",true);
}

cbLocationAllowUnchecked(...)
{
Settings.SetSetting("allowLocation,false);
}

On main page as conditional

MapButtonClicked(...)
{
if (!Settings.HasSetting("allowLocation") || !((bool)Settings.GetSetting("allowLocation"))
        MessageBox.Show("Allow app to use your location?, "Location Services",MessageBoxButtons.OkCancel);
//handle result
else{

StartLocationSearch();
}

}

Any suggestions or links that would help me out would be great.

Thanks,

  • 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-05-26T05:11:43+00:00Added an answer on May 26, 2026 at 5:11 am

    Use the IsolatedStorageSettings class to save your setting.

    To store the setting

    private void cbLocationAllow_Checked(object sender, RoutedEventArgs e)
    {
      var settings = IsolatedStorageSettings.ApplicationSettings;
    
      settings["allowLocation"] = true;
      settings.Save();
    }
    

    To read the setting

    var settings = IsolatedStorageSettings.ApplicationSettings;
    bool allowLocation = false;
    
    if( settings.Contains( "allowLocation" ) ) {
      allowLocation = (bool)settings["allowLocation"];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently Im have the following script which checks to see if a checkbox value
I have a JSF page on which I want to have a checkbox that,
I have a checkall script that select all checkboxes via a checkbox click. Currently
I currently have a custom CheckBox style which I use in a DataGrid. However,
I currently have 4 textboxes, 1 checkbox and a dropdownlist. I am attempting to
Currently I have a UITextView field with the CheckBox Detect Links checked. The contents
Currently I have a list view within it each row has a checkbox attached.
Currently we have a table with a bunch of data from a database which
I currently have a dropdown box which enters an integer into a table. It's
I currently have a checkbox that is bound to a property that checks an

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.