Introduction:
The AnimationExtender is a simple extender that allows you to
utilize the powerful animation framework with existing pages in an easy, declarative fashion. It
plays animations whenever a specific event like OnLoad,
OnClick, OnMouseOver, or
OnMouseOut is raised by the target control.
Example:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>ajax Animation control</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:AnimationExtender ID="AnimationExtender1" runat="server" TargetControlID="Image1">
<Animations>
<OnLoad>
<FadeOut Duration="5" MinimumOpacity="5" MaximumOpacity="5" />
</OnLoad>
<OnHoverOut>
<Sequence>
<FadeOut Duration=".5" MinimumOpacity=".2" MaximumOpacity="1" />
</Sequence>
</OnHoverOut>
<OnHoverOver>
<FadeIn Duration=".5" MinimumOpacity=".2" MaximumOpacity="1" />
</OnHoverOver>
</Animations>
</asp:AnimationExtender>
<asp:Image runat="server" ID="Image1" ImageUrl="~/slide-1-728.jpg" BorderWidth="0px"
Width="342px" />
</form>
</body>
</html>
0 comments :
Post a Comment