Add Separator Line In System Tray Context-Menu Programatically
When creating a ContextMenu programatically, this class only accepts MenuItem items. Adding a Separator ( < Separator /> ) as one would do in XAML does not work. To add a separator line is actually quite easy, but you have to know to create a MenuItem with the parameter ”-“ as string.
More …