Create Sub Items in contextMenu codeBehind

I want to show subitems in context menu.

I saw couple of examples however they were not code behind and I couldn't edit as HTML.

I want to make it in code behind. My current items code looks like below. How can i add subitems in this way?

void ShowContextMenuWithItems(MouseEventArgs args)
    {
        ContextMenuService.Open(args,
            new List<ContextMenuItem> {
                new ContextMenuItem(){ Text = "Context menu item 1", Value = 1, Icon = "home" },
                new ContextMenuItem(){ Text = "Context menu item 2", Value = 2, Icon = "search", Disabled = true },
                new ContextMenuItem(){ Text = "Context menu item 3", Value = 3, Icon = "info" },
         }, OnMenuItemClick);
    }

The only way is like this: