PDA

View Full Version : [CLOSED] Add menu to window



T3rryChan
Jun 20, 2012, 12:01 AM
Hi,

I am trying to add a menu to a window like this



@Html.X().Window().Title("Versus Report").Layout("border").Maximized(true).Items(items =>
{
items.Add(Html.X().MenuPanel().Menu(menu => menu.Add(Html.X().Menu().Items(menuItems =>
{
menuItems.Add(Html.X().MenuItem().Text("test"));
}))));
})


The menu does show, but not the menu item. Could someone please take a look at it? Thanks.

Daniil
Jun 20, 2012, 11:13 AM
Hi,

You should add items directly to MenuPanel Menu.

Example

@(Html.X().Window()
.Title("Title")
.Items(items =>
{
items.Add(Html.X().MenuPanel()
.Menu(menu =>
menu.Items.Add(Html.X().MenuItem().Text("test"))
)
);
})
)