I have a main menu mnuMainMenu consisting of several sub-menus. One of the sub-menus mnuMostRecentDirs is itself another menu that has it\'s items
mnuMainMenu
mnuMostRecentDirs
I really think it's not a good idea or ""WPF compatible"" to add UIelemnts from code.
I would suggest something like this:
and set MainMenu's ItemsSource to MostRecentFoldersList
MostRecentFoldersList