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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:37:01+00:00 2026-05-11T11:37:01+00:00

Why does the following animation flicker and act goofy on MouseLeave? If it can

  • 0

Why does the following animation flicker and act goofy on MouseLeave? If it can be repro-ed, I’ll post a screencast.

<Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'       xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>   <Canvas>     <Path Fill='Blue' Margin='15,15,15,15'>       <Path.Data>         <!-- Describes an ellipse. -->         <EllipseGeometry x:Name='MyAnimatedEllipseGeometry' Center='200,100' RadiusX='15' RadiusY='15' />       </Path.Data>       <Path.Triggers>         <EventTrigger RoutedEvent='UIElement.MouseEnter'>           <BeginStoryboard>             <Storyboard Duration='0:0:.5'>               <DoubleAnimation Storyboard.TargetName='MyAnimatedEllipseGeometry'                           Storyboard.TargetProperty='RadiusX'                          From='15' To='100' />               <DoubleAnimation Storyboard.TargetName='MyAnimatedEllipseGeometry'                           Storyboard.TargetProperty='RadiusY'                          From='15' To='100' />             </Storyboard>           </BeginStoryboard>         </EventTrigger>         <EventTrigger RoutedEvent='UIElement.MouseLeave'>           <BeginStoryboard>             <Storyboard Duration='0:0:.5'>               <DoubleAnimation Storyboard.TargetName='MyAnimatedEllipseGeometry'                           Storyboard.TargetProperty='RadiusX'                          From='100' To='15' />               <DoubleAnimation Storyboard.TargetName='MyAnimatedEllipseGeometry'                           Storyboard.TargetProperty='RadiusY'                          From='100' To='15' />             </Storyboard>           </BeginStoryboard>         </EventTrigger>       </Path.Triggers>     </Path>   </Canvas> </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. 2026-05-11T11:37:01+00:00Added an answer on May 11, 2026 at 11:37 am

    The reason is that you specify a From on your DoubleAnimations.

    If the radius is anything less than 100 when MouseLeave happens, the From property will make it jump up to 100 and likely cause a MouseEnter. Then, you have two competing animations and the mouse events go crazy as the ellipse radius flickers underneath the cursor.

    The solution is to just omit the From properties, this will cause the animation to start from wherever the current radius is:

    <Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml' Title='Window1'>     <Canvas>         <Path Margin='15,15,15,15' Fill='Blue'>             <Path.Data>                 <!-- Describes an ellipse. -->                 <EllipseGeometry x:Name='MyAnimatedEllipseGeometry' Center='200,100' RadiusX='15' RadiusY='15'/>             </Path.Data>             <Path.Triggers>                 <EventTrigger RoutedEvent='UIElement.MouseEnter'>                     <BeginStoryboard>                         <Storyboard>                             <DoubleAnimation Storyboard.TargetName='MyAnimatedEllipseGeometry' Duration='0:0:.5' Storyboard.TargetProperty='RadiusX' To='100'/>                             <DoubleAnimation Storyboard.TargetName='MyAnimatedEllipseGeometry' Duration='0:0:.5' Storyboard.TargetProperty='RadiusY' To='100'/>                         </Storyboard>                     </BeginStoryboard>                 </EventTrigger>                 <EventTrigger RoutedEvent='UIElement.MouseLeave'>                     <BeginStoryboard>                         <Storyboard>                             <DoubleAnimation Storyboard.TargetName='MyAnimatedEllipseGeometry' Duration='0:0:.5' Storyboard.TargetProperty='RadiusX' To='15'/>                             <DoubleAnimation Storyboard.TargetName='MyAnimatedEllipseGeometry' Duration='0:0:.5' Storyboard.TargetProperty='RadiusY' To='15'/>                         </Storyboard>                     </BeginStoryboard>                 </EventTrigger>             </Path.Triggers>         </Path>     </Canvas> </Page> 

    On an unrelated note, when you set Storyboard.Duration, it won’t speed up your child animations, it will just end the Storyboard prematurely. You really want to set Duration on your child DoubleAnimations – I’ve modified the XAML above to do this.

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

Sidebar

Related Questions

i have the following shape <shape xmlns:android=http://schemas.android.com/apk/res/android android:shape=rectangle> <gradient android:angle=360 android:endColor=@color/LightBlue android:startColor=@color/DarkBlue/> <corners android:topRightRadius=10dp
Can any one tell me? what does following means in ruby program: obj =
I keep getting the following errors: 2011-04-02 14:55:23.350 AppName[42430:207] nested push animation can result
I have the following code, which does a nice animation when pushing a new
Why does following code snippet doesn't work? It doesn't gives any error, but also
I'm getting crazy with this IE 7... ==> hhttp://neu.emergent-innovation.com/ Why does following function not
I have a file transfer program. The program (Client) does following operations to send
Does the following psuedo code accomplish my goal of cleaning up after myself when
Does the following code contain a memory leak of the first three characters in
Does the following statement holds for any double (Java primitive double precision IEEE-754) except

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.