Customize Direction in EJ 1 ASP.NET MVC NavigationDrawer

23 Aug 2017 / 1 minute to read

By using this property, you can set the drawer to be open from right to left direction or left to right direction. The possible direction values are Right, Left and the default value is Left. Refer to the following code example.

  • cshtml
  • @Html.EJ().NavigationDrawer("navigationPane").Width(300).Direction(NavigationDrawerDirection.Right).ContentTemplate(@<div>
    
    @Html.EJ().ListView("list").Width(300).Items(items =>
    
    {
    
    	 items.Add().Text("Home");
    
    	 items.Add().Text("Profile");
    
    	 items.Add().Text("Photos");
    
    	 items.Add().Text("Location");
    
    })
    
    </div>)

    The following screenshot displays the output by swiping from right to left at the right side end of the screen.

    Customize-Direction_img1