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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T11:32:29+00:00 2026-06-14T11:32:29+00:00

Basically I have a couple of buttons on a page, when a user clicks

  • 0

Basically I have a couple of buttons on a page, when a user clicks one of the buttons the application has to run an animation then navigate to a second page with the name of the button stored in the query string

 private void Button1_Click(object sender, RoutedEventArgs e)
        {
            myAnimation.Begin();
            myAnimation.Completed += new EventHandler(myAnimation_Completed);

        }

        void myAnimation_Completed(object sender, EventArgs e)
        {
             //If Button1 was clicked
            NavigationService.Navigate(new Uri("/nextPage.xaml?id=Button1",UriKind.Relative));

             //If Button2 was clicked
            NavigationService.Navigate(new Uri("/nextPage.xaml?id=Button2",UriKind.Relative));

             //etc
        }

I don’t know what condition I can use for the IF statements.

EDIT: Managed to solve the navigation problem by changing the event statement to

myAnimation.Completed += new EventHandler((a,b) => MyAnimation_complete(sender, e)); 

but now am having trouble navigating back, when I click the back button from the second page I go to the first page but I find no controls there.It may also be helpful to note the “MyAnimation” is just a transition animation.

  • 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-14T11:32:30+00:00Added an answer on June 14, 2026 at 11:32 am

    why don’t use lambda expressions

    private void Button1_Click(object sender, RoutedEventArgs e)
        {
            myAnimation.Begin();
            myAnimation.Completed += (s,ev)=>
              {
               NavigationService.Navigate(new Uri("/nextPage.xaml?id=Button1",UriKind.Relative));
              };
    
        }
    

    samething for Button2

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

Sidebar

Related Questions

I basically have a program that filters records from one excel file to another
So Basically I have a <div> which contains two buttons. I want to position
I'm wondering if this is even possible. Basically I have a couple objects that
I have a couple of global structs in a binary which are basically tables
I have a page where you basically select a set of options (configuration), and
So I'm creating this class that has two buttons, one for logging in, and
Basically I have a table with a couple of columns marked Unique. I have
Basically the subject says it all: We have a couple of components running on
I have a couple of super simple databases. Basically they all consist of single
I'm pretty new to scala and basically I want to have a couple of

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.