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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:05:35+00:00 2026-05-31T18:05:35+00:00

If i have a storyboard animation defined in xaml resources, how do i go

  • 0

If i have a storyboard animation defined in xaml resources, how do i go about disabling it?

For example, if I have something like this on a UserControl.Resources section:

<Storyboard x:Key="MyKey">
        <DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:.5" DecelerationRatio="1" />
        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility">
            <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
        </ObjectAnimationUsingKeyFrames>
    </Storyboard>

IS there a way to disable the animation in xaml..?

  • 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-31T18:05:37+00:00Added an answer on May 31, 2026 at 6:05 pm

    A XAML way is described here: http://msdn.microsoft.com/en-us/library/ms741997.aspx

    Code behind:
    You can use FindResource to get the StoryBoard, cast it to a StoryBoard and call Stop.

    Edit: See http://www.galasoft.ch/mydotnet/articles/article-2006102701.aspx for a deeper look into storyboards and code behind.

    Edit: Using Properties within triggers:

    <MultiTrigger>
        <MultiTrigger.Conditions>
            <Condition Property="IsActive" Value="True"/>
        </MultiTrigger.Conditions>
        <MultiTrigger.EnterActions>
            <BeginStoryboard Storyboard="{StaticResource StoryBoard1}"/>
        </MultiTrigger.EnterActions>
        <MultiTrigger.ExitActions>
            <BeginStoryboard Storyboard="{StaticResource StoryBoard2}"/>
        </MultiTrigger.ExitActions>
    </MultiTrigger>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a storyboard like the following Duration=0:0:1 Completed=DeviceExplorer_Completed> The animation for some reason
Let's say that I have this storyboard: <Storyboard x:Key=OnMouseEnterStoryboard> <DoubleAnimation BeginTime=00:00:00 Storyboard.TargetProperty=(UIElement.RenderTransform).(RotateTransform.Angle) To=180 />
i have two animation: <Storyboard x:Key=ChangeLayout> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=(Canvas.Left) Storyboard.TargetName=currentContent> <EasingDoubleKeyFrame KeyTime=0:0:0.0 Value=900/> <EasingDoubleKeyFrame KeyTime=0:0:0.2
I have a storyboard animation, I'd like for it to go twice as fast
I have a storyboard animation in a popup and I want this to be
Well, as the title suggests: I have a storyboard and I want it's animation
I have done the candle animation tutorial here but I would like to save
We have a color animation that blends from red to white. Currently, this is
I have a very simple UserControl that starts a progess bar animation when it
In my current application I have this little animation. It makes a full 360

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.