Sep 27, 2013, 3:58 PM
Dynamic Menu Creation
Hello,
I have the following static code to create a Menu but would like to populate it from a string array or a list of data such as string [ ] { "Menu1" , "Menu2" , "Menu3" }. Thanks ...
X.Panel ( )
.Title ( "Item 3: 100% 50%" )
.AnchorHorizontal ( "100%" )
.AnchorVertical ( "50%" )
.Items( X.Menu ( )
.TitleAlign(TitleAlign.Right)
.Defaults(new { MenuAlign = "tl-bl?" } )
.Floating ( false )
.Layout (LayoutType.HBox)
.ShowSeparator ( false )
.Items(
X.ToolbarFill(),
X.MenuItem()
.Text("Web Access Links")
.Menu(
X.Menu()
.Items
(
X.MenuItem()
.Text("HI there"),
X.MenuItem()
.Text("HI there2")
)
),
X.MenuItem()) )
I have the following static code to create a Menu but would like to populate it from a string array or a list of data such as string [ ] { "Menu1" , "Menu2" , "Menu3" }. Thanks ...
X.Panel ( )
.Title ( "Item 3: 100% 50%" )
.AnchorHorizontal ( "100%" )
.AnchorVertical ( "50%" )
.Items( X.Menu ( )
.TitleAlign(TitleAlign.Right)
.Defaults(new { MenuAlign = "tl-bl?" } )
.Floating ( false )
.Layout (LayoutType.HBox)
.ShowSeparator ( false )
.Items(
X.ToolbarFill(),
X.MenuItem()
.Text("Web Access Links")
.Menu(
X.Menu()
.Items
(
X.MenuItem()
.Text("HI there"),
X.MenuItem()
.Text("HI there2")
)
),
X.MenuItem()) )