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

  • Home
  • SEARCH
  • 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 .NET v3.5 SP1 has been released (along with VS2008 SP1), we now
Now my team working in a project using Windows Application(C#) . We use MSI
Now that biginteger (System.Numerics.BigInteger) support has been added in C# 4.0, it would be
Now that std has a real hash map in unordered_map , why (or when)
Now my problem is not one but two, which are as follows: App Requirement:
Now that most of the major browsers support full page zoom (at present, the
Now that I know C++ I want to get into desktop application that have
Now that LINQ to SQL is a little more mature, I'd like to know
now i need to insert some data from the sqlserver into a word,i know
Now, before you say it: I did Google and my hbm.xml file is 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.