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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:54:12+00:00 2026-05-23T00:54:12+00:00

I have a story board where I am making a rectangle move up like

  • 0

I have a story board where I am making a rectangle move up like a needle in a MPH car gauge. So, I make it go from 0 to 60 and I want to be able to get its current value while it’s changing so I can use that value to make a digital gauge.

How can I get the current value from the beginning to the end of a double animation? I have something like this:

DoubleAnimation da = new DoubleAnimation();
da.Duration = new Duration(TimeSpan.FromSeconds(5));
da.From = 0;
da.To = 60;
RotateTransform rt = new RotateTransform();
rt.CenterX = 35;
rt.CenterY = 0;
rec3.RenderTransform = rt;
rt.BeginAnimation(RotateTransform.AngleProperty, da);

When it rotates the rectangle up I tried to get that angle but it just returned zero.

  • 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-23T00:54:13+00:00Added an answer on May 23, 2026 at 12:54 am

    You must be doing something wrong, consider this example:

    <Rectangle Width="100" Height="10" Fill="Red" HorizontalAlignment="Left" RenderTransformOrigin="1,0.5">
        <Rectangle.RenderTransform>
            <RotateTransform x:Name="rt" />
        </Rectangle.RenderTransform>
    </Rectangle>
    <TextBlock Text="{Binding ElementName=rt, Path=Angle}" />
    
    rt.BeginAnimation(RotateTransform.AngleProperty, new DoubleAnimation(0, 60, TimeSpan.FromSeconds(1), FillBehavior.HoldEnd));
    

    It displays the value just fine.


    If you assign the rt.Angle to some variable that variable will have the value of the transform angle at that point in time, it will not change concurrently with the rt.Angle property.

    If you are new to databinding which i used in the above code you might want to check out the overview.

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

Sidebar

Related Questions

I'm making Catalog like iOS application. using Xcode 4.2 with story board. This application
I have a huge crazy scene in my story board that has 36 different
I'm new to iOS & Xcode development. I have created a new story board
I'm making Pacman game in opengl and I want to move my pacman in
I have a facebook 'like' application - a virtual white board for multiple 'teams'
Design :- 1)A story board has a number of slides, each slide can have
I have an application which uses a main story board to include a Navigation
I have a problem with Custom cell on story board. I need to access
As you have seen from my subject above, I would like to know how
I have a storyboard like the following Duration=0:0:1 Completed=DeviceExplorer_Completed> The animation for some reason

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.