Menu - Orientation


About this example


This example shows how to configure the DJME Menu for ASP.NET MVC to render its items in horizontal or vertical direction.
Use the ChangeType method to set the orientation of the menu. The method accepts the DNA.Mvc.jQuery.MenuTypes enumeration:


<% 
/*Horizontal orientation : Use the DNA.Mvc.jQuery.MenuTypes.Horizontal option*/
Ajax.Dna().Menu("Menu1")
                .ChangeType(MenuTypes.Horizontal)
                .Items(items =>
                {
                    /*items definition*/
                })
                .Render();


/*Vertical orientation : Use the DNA.Mvc.jQuery.MenuTypes.Vertical option */
Ajax.Dna().Menu("Menu2")
                .ChangeType(MenuTypes.Vertical)
                .Items(items =>
                {
                    /*items definition*/
                })
                .Render();
%>