RadMenu for ASP.NET

RadMenu Send comments on this topic.
CollapseAnimation Property
See Also  Example
Telerik.WebControls Namespace > RadMenu Class : CollapseAnimation Property


Gets the settings for the animation played when an item closes.   

 

Namespace: Telerik.WebControls
Assembly: RadMenu (in RadMenu.dll)

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property CollapseAnimation As AnimationSettings
Visual Basic (Usage)Copy Code
Dim instance As RadMenu
Dim value As AnimationSettings
 
value = instance.CollapseAnimation
C# 
public AnimationSettings CollapseAnimation {get;}

Return Value

An AnnimationSettings that represents the collapse animation.

Example

The following example demonstrates how to set the CollapseAnimation of RadMenu.

ASPX:

<radM:RadMenu ID="RadMenu1" runat="server">

<CollapseAnimation Type="OutQuint" Duration="300" />

<Items>

<radM:RadMenuItem Text="News" >

<Items>

<radM:RadMenuItem Text="CNN" NavigateUrl="http://www.cnn.com" />

<radM:RadMenuItem Text="Google News" NavigateUrl="http://news.google.com" />

</Items>

</radM:RadMenuItem>

<radM:RadMenuItem Text="Sport" >

<Items>

<radM:RadMenuItem Text="ESPN" NavigateUrl="http://www.espn.com" />

<radM:RadMenuItem Text="Eurosport" NavigateUrl="http://www.eurosport.com" />

</Items>

</radM:RadMenuItem>

</Items>

</radM:RadMenu>

C#Copy Code
void Page_Load(object sender, EventArgs e)
{
   RadMenu1.CollapseAnimation.Type = AnimationType.Linear;
   RadMenu1.CollapseAnimation.Duration = 300;
}
    
Visual BasicCopy Code
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    RadMenu1.CollapseAnimation.Type = AnimationType.Linear
    RadMenu1.CollapseAnimation.Duration = 300
End Sub

Remarks

Use the CollapseAnimation property to customize the expand animation of RadMenu. You can specify the Type, Duration and the items are collapsed.
To disable expand animation effects you should set the Type to AnimationType.None. To customize the expand animation you can use the ExpandAnimation property.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also