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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:39:27+00:00 2026-05-20T23:39:27+00:00

Now I’m developing a Windows Phone 7 app, my app has three buttons located

  • 0

Now I’m developing a Windows Phone 7 app, my app has three buttons located at the applicaton bar. Here is the event handler for these three buttons:

    //app bar page navigation
    private void ApplicationBarIconButton_Click1(object sender, EventArgs e)
    {
        if(//check if the current displayed page is mainpage)
        {
            //do nothing
        }
        else
        {
            NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.RelativeOrAbsolute));
        }
    }

    private void ApplicationBarIconButton_Click2(object sender, EventArgs e)
    {
        NavigationService.Navigate(new Uri("/Audios.xaml", UriKind.RelativeOrAbsolute));
    }

    private void ApplicationBarIconButton_Click3(object sender, EventArgs e)
    {
        NavigationService.Navigate(new Uri("/Statistics.xaml", UriKind.RelativeOrAbsolute));
    }

The button navigation works well except the first one (Button_Click1) because when I first access the main page and click the first button the app will automatically go back to app list.

So I want to use if-else statement to check which page is currently displayed and then decide whether to navigate or stay in the current page.

  • 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-20T23:39:27+00:00Added an answer on May 20, 2026 at 11:39 pm

    Button click1 should be removed from the main page. It makes no sense to have that button there.

    Other pages should use the back button to return to the main page. Otherwise you mess up your back stack.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Now that my facebook app has got more than 1000 likes -- https://apps.facebook.com/156485447732146/ But
Now that Windows Phone Developer Tools 7.1 Beta is available for download , I
Now that .NET v3.5 SP1 has been released (along with VS2008 SP1), we now
Now my app targets >iOS4 I am trying to remove dependencies on non Apple
now i have such structure on my server ./site.com/ ./site.com/mage ./site.com/mage/Mage.php ./site.com/mage/app ......... ./site.com/public
Now that Maven3 has dropped support for setting uniqueVersion=false on deployment, I'm running into
now here is a problem with me that how can I enter the current
Now my problem is not one but two, which are as follows: App Requirement:
Now, I use Xcode 4.2 supporting iOS 5.0. Apple has just released iOS 5.0.1
Now I have a problem as the title. Here is my environment: OS:ubuntu 10.10

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.