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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:11:53+00:00 2026-06-10T07:11:53+00:00

I need somehow pass double fromH, double toH, UIElement control to the AnimateH method

  • 0

I need somehow pass double fromH, double toH, UIElement control to the AnimateH method within of sb.Completed but I got the error

The name ‘toW’ does not exist in the current context issue

and etc..

How do i can fix it?

Thank you!

 void AnimateTop(double from, double to, double fromH, double toH, UIElement control)
        {
            Debug.WriteLine("EFM - AnimateTop - from: " + from.ToString() + " to: " + to.ToString());
            Storyboard sb = new Storyboard();
            DoubleAnimation da = new DoubleAnimation();
            da.From = from;
            da.To = to;
            da.Duration = new Duration(TimeSpan.FromSeconds(1));
            sb.Children.Add(da);
            Storyboard.SetTargetProperty(da, new PropertyPath("(Canvas.Top)"));
            Storyboard.SetTarget(da, control);
            sb.Completed += (w, r) => 
            { 
                AnimateH(fromW, toW, control); // Here is the error
                control.UpdateLayout(); 
            };
            sb.Begin();
        }
  • 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-10T07:11:55+00:00Added an answer on June 10, 2026 at 7:11 am

    You’re using toW but it’s not declared anywhere
    or passed as parameter

    If it’s a value that comes from another place, you should passed as a parameter. If it’s a value created from some method there, you should declare the type and get its value

    TypeOftoW toW = MethodThatReturntoWValues();
    

    before using it.

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

Sidebar

Related Questions

PriorityBlockingQueue is unbounded, but I need to bound it somehow. What is the best
Possible Duplicate: How to pass a PHP variable to Javascript? I need to somehow
I'm trying to hack a 3rd party JavaScript pop-up and I need to somehow
I need to Open a process (easy) and then somehow paste data from my
I am an IT guy, and what I need to do is to somehow
What I need to accomplish is a single Application with a single database but
I need to pass parameter to remote beanshell script which is run through java
I'm using OpenGL and I need to pass to a function array of bytes.
So I have this existing command that accepts a single argument, but I need
Need to apply a filter to a file like this: TUPAC_0006:1:1:2554:2356#0/1 0 * 0

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.