I have a simple WPF application with a menu. I need to add menu items dynamically at runtime. When I simply create a new menu item, and add it onto its parent MenuItem, it
I ran into the same problem. In my case the problem was that in the XAML the was directly contained in a . Once I put the inside a it started working. So: