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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:41:02+00:00 2026-06-04T02:41:02+00:00

We have a color animation that blends from red to white. Currently, this is

  • 0

We have a color animation that blends from red to white. Currently, this is a linear fade. We know we can play with the Storyboard class’s BeginTime and such, but that simply delays the start of the entire animation. We’ve also looked at the ease-in/ease-out side of things, but they don’t seem to work either.

Specifically, we’d like to hold a value of red for one second, then fade from red to white over the next. Can that be done in pure XAML? If not, can it be done in code-behind manually setting up a storyboard? …or do we have to use two separate storyboards and play them in sequence?

  • 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-04T02:41:03+00:00Added an answer on June 4, 2026 at 2:41 am

    Several ways to do this.

    with key frames:

    <Storyboard>
        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="Background.Color">
            <DiscreteColorKeyFrame Value="Red" KeyTime="0:0:0" />
            <DiscreteColorKeyFrame Value="Red" KeyTime="0:0:1" />
            <LinearColorKeyFrame Value="White" KeyTime="0:0:2" />
        </ColorAnimationUsingKeyFrames>
    </Storyboard>
    

    with two animations in sequence:

    <Storyboard>
        <ColorAnimation Storyboard.TargetProperty="Background.Color"
                        From="Red" To="Red" Duration="0:0:1" />
        <ColorAnimation Storyboard.TargetProperty="Background.Color"
                        To="White" BeginTime="0:0:1" Duration="0:0:1" />
    </Storyboard>
    

    with a custom easing function:

    <Storyboard>
        <ColorAnimation Storyboard.TargetProperty="Background.Color"
                        From="Red" To="White" Duration="0:0:2">
            <ColorAnimation.EasingFunction>
                <local:CustomEasingFunction />
            </ColorAnimation.EasingFunction>
        </ColorAnimation>
    </Storyboard>
    

    In this case a function that shows the transition in the first half of duration and holds the value in the second half. Because the default EasingMode is EaseOut this function will then ‘play’ backwards.

    public class CustomEasingFunction : EasingFunctionBase
    {
        public CustomEasingFunction() : base()
        { }
    
        protected override double EaseInCore(double normalizedTime)
        {
            return (normalizedTime < 0.5)
                ? normalizedTime * 2
                : 1;
        }
    
        protected override Freezable CreateInstanceCore()
        {
            return new CustomEasingFunction();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm dealing with this situation : I have a color animation script which targets
I'd like to create an indeterminate animation that simply fades from one color to
im using jquery animation for the first time.i have read that animation can be
I need to create a color animation. I have a control (a slick button
I have added some animation using jquery but it's not working: $('.test-container').click(function(){ $(this).css('background-color', 'rgb(119,
I have some .bmp files that have some color (maybe black) that is supposed
Anyone know why CSS provides color for text, but does not have font-color or
I have an element that can have an arbitrary background colour (set via a
I am using this Math for a bg color animation on hover: var col
So I have created a CSS3 animation that does not behave consistently across the

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.