In this article we'll see as to how we can use ASP.NET Menu's DynamicHorizontalOffset property .
This property comes very handy when you wanna play around with the positioning of the child menu corresponding to its parent menu item. Especially when you are working on the arabic layout of the page . Actually the real problem comes when you create a DYNAMIC menu consisting of child menu items as well. So by default , the positioning of child menu items comes on the right side of the menu when actually it has to be positioned on the left . So ,here comes the DynamicHorizontalOffset property into picture.
Given below is an example as to how we can st this property ,
private void PopulateMenu()
{
..... // Your Stuff
......
.....
MyMenu.DynamicHorizontalOffset = -300; // MyMenu is the name of the Menu
}
-300 is the pixel position which you can change as per your requirement . The above syntax has given especially for the ARABIC version of a page.
c7a6dc9d-05a0-4da6-a359-cb28a91e6135|0|.0
Tags:
asp.net . menu,
dynamic menu,
dynamichorizontaloffset,
dynamic horizontal offset
Categories:
ASP.NET