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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:06:03+00:00 2026-06-15T23:06:03+00:00

I am developing a small game type application,when user wins the game he will

  • 0

I am developing a small game type application,when user wins the game he will get the popup as win for this I wrote the below code.

  public void stoptimer()
 {

        if ((Convert.ToString(b1.Content) == "1") && (Convert.ToString(b2.Content) == "2") && (Convert.ToString(b3.Content) == "3") && (Convert.ToString(b4.Content) == "4") && (Convert.ToString(b5.Content) == "5") && (Convert.ToString(b6.Content) == "6") && (Convert.ToString(b7.Content) == "7") && (Convert.ToString(b8.Content) == "8") && (Convert.ToString(b9.Content) == "9") && (Convert.ToString(b10.Content) == "10") && (Convert.ToString(b11.Content) == "11") && (Convert.ToString(b12.Content) == "12") && (Convert.ToString(b13.Content) == "13") && (Convert.ToString(b14.Content) == "14") )

        {
            newTimer.Stop();
            time = txtClock.Text;
            //textBox2.Text = txtClock.Text;
            Popup buyNowScreen;
            buyNowScreen = new Popup();
            buyNowScreen.Child =
                new popupscreen
                    ();
            buyNowScreen.IsOpen = true;
            buyNowScreen.VerticalOffset = 100;
            buyNowScreen.HorizontalOffset = 25;

        }
      }

And I wrote the below code for navigate from popup page to other pages but it is not working getting the NullReferenceException.

   private void button3_Click(object sender, RoutedEventArgs e)
    {

        ClosePopup();
        NavigationService.Navigate(new Uri("/Menu.xaml", UriKind.Relative));
    }

    private void button1_Click(object sender, RoutedEventArgs e)
    {
        ClosePopup();

        NavigationService.Navigate(new Uri("/NumericEasy.xaml", UriKind.Relative));

    }


    private void ClosePopup()
    {
        Popup buyPop = this.Parent as Popup;
        if (buyPop.IsOpen)
        {
            buyPop.IsOpen = false;


        }

    }
  • 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-15T23:06:04+00:00Added an answer on June 15, 2026 at 11:06 pm

    Here is the procedure for giving events to popup page’s controls.

        Popup buyNowScreen=new Popup();
    
        popupscreen popup1=new popscreen();
        buyNowScreen.Child =popup1;
        buyNowScreen.isOpen=true;
        popup1.button1.click+= new RoutedEventHandler(btn_playagain_click);
        private void btn_playagain_click(object sender, EventArgs e)
         {
            p.IsOpen = false;
            NavigationService.Navigate(new Uri("/NumericEasy.xaml?Refresh=true", UriKind.Relative));
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a small android application. When the user hasn't signed up, he
I have question I'm developing small application to desktop in win Forms. I'm using
I'm developing a small game and I instantiate a few objects like this :
I'm currently developing a small OpenGL game for the Android platform and I wonder
Im developing a small web aplication, used in a shared computer. When the user
I am developing a small application and for that authentication is needed. That I'm
I'm developing a small application using Blend, basically what I have in my application
I recently started developing a small app using the sample provided in this article.
I'm currently developing a small application in WPF for us at work though I'm
I am developing a small game prototype in Unity 3.5.5f - in which the

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.