This is a migrated thread and some comments may be shown as answers.

Animation for MVC wrapper for KendoUI Menu

2 Answers 145 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 29 Jul 2012, 01:35 AM
good morning everyone,

i am currently trying to setup a menu using the MVC wrapper for KendoUI menu and having some difficulty trying to setup the Animation part.

The animation method is overloaded.  I know one of them i pass in a boolean but the other one, not sure how to use that one.  Right now, I have:

@(Html.Kendo().Menu()
                .Name("mainMenu")
                .Animation(true) ) 


But i want to be able to customize the setup of the animation of the menu like how the regular KendoUI Menu can, using the 2nd overloaded Animation method:

var $mainMenu = $('#mainMenu');

        $mainMenu.kendoMenu({
            animation: 
            { 
                open: 
                { 
                    effects: "fadeIn slideIn:down"
                } 
            },
        });


There isn't any documentation or example of how to use the 2nd overloaded Animation method of the KendoUI MVC wrapper.  I am currently using the latest trial version of the Kendo UI Complete for ASP.NET MVC.

Thank you very much for you help.

2 Answers, 1 is accepted

Sort by
0
Accepted
Petur Subev
Telerik team
answered on 01 Aug 2012, 06:30 AM
Hello Sam,

Basically to use the advanced overload of the Animation options you need to use lambda expressions and the so called fluent configuration. Such syntax is used in most of our demos.
Here is an example:
.Animation(c=>
  c.Open(op=>
      op.Duration(AnimationDuration.Slow)
  )
  .Close(close=>
      close.Zoom(ZoomDirection.Out).Duration(AnimationDuration.Fast)
  )
)

I hope this helps.

Kind regards,
Petur Subev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sam
Top achievements
Rank 1
answered on 01 Aug 2012, 09:19 PM
yup, thank you very much Petur.

have a great day
Tags
Menu
Asked by
Sam
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Sam
Top achievements
Rank 1
Share this question
or