Yellow Fade Technique with Atlas
After seeing the new animation capabilities in the Atlas Control Toolkit, I wanted to experiment with implementing the Yellow Fade Technique. I can't believe how simple it is with the new UpdatePanelAnimationExtender.
Demo: http://atlas.vertigosoftware.com/atlasyellowfade/
Source: http://blogs.Vertigosoftware.com/files/alan/atlasyellowfade.zip
The Code
The code should be really straight-forward. I have an Update panel which contains an ASP.NET Label. The update panel is triggered by the submit button which will change the label text to say hello to whatever's in the Textbox control. I also added a server timestamp to the label.
To apply the yellow fade technique, I wrap the update panel around a div container and add the UpdatePanelAnimationExtender with properties to enable animation when the update panel has been updated. There are two animation configured to fire in parallel for 2 seconds. The first changes the background color from a shade of yellow back to white. The second animation fades the content of the updatecontainer.
The work is done in this piece of code. No knowledge of javascript necessary*!
<atlasToolkit:UpdatePanelAnimationExtender ID="upae" runat="server">
<atlasToolkit:UpdatePanelAnimationProperties TargetControlID="UpdatePanel1">
<Animations>
<OnUpdated>
<Sequence>
<Parallel duration="2" Fps="30">
<Color AnimationTarget="updatecontainer" StartValue="#FFEF3F" EndValue="#FFFFFF" Property="style" PropertyKey="backgroundColor" />
<FadeIn AnimationTarget="updatecontainer" minimumOpacity=".2" />
</Parallel>
</Sequence>
</OnUpdated>
</Animations>
</atlasToolkit:UpdatePanelAnimationProperties>
</atlasToolkit:UpdatePanelAnimationExtender>
* The design time support for the UpdateAnimationExtender shows the animation as simply "(Text)", so you would need to know the syntax for animations to configure it.