The typical way to create a menu with sub-items is to use a template that looks something like this:
<Menu ItemsSource="{Binding appMenuItemList}">
<Menu.ItemContainerStyle>
<Style TargetType="{x:Type MenuItem}">
<Setter Property="Command" Value="{Binding Command}" />
</Style>
</Menu.ItemContainerStyle>
<Menu.ItemTemplate>
<HierarchicalDataTemplate DataType="{x:Type local:AppMenuItem}" ItemsSource="{Binding Path=AppSubMenuItems}">
<TextBlock Text="{Binding AppMenuName}"/>
</HierarchicalDataTemplate>
</Menu.ItemTemplate>
</Menu>
Note that you have work to do here as you actually need to supply a command for the code to execute:
internal class AppMenuItem
{
public int AppMenuID { get; set; }
public string AppMenuName { get; set; }
public string AppMenuUrlPath { get; set; }
public int AppMenuParentID { get; set; }
public List<AppMenuItem> AppSubMenuItems { get; set; }
public ICommand Command { get; set; }
}
I don't know what you're trying to do there so I can't supply a command for you. I haven't supplied code for your command implementation - you can find any number of ICommand implementations; search for RelayCommand for a good example to use as the source of your ICommand if you don't have one.