Category / Section
How to add icon to context menu item in WPF Diagram (SfDiagram)?
WPF Diagram (SfDiagram) supports adding custom context menu items in the already existing menu or create new menu with custom context menu items. We can add icon for the custom context menu items also.
C#
DiagramMenuItem item = new DiagramMenuItem()
{
Content = "Delete",
Command = DiagramCommands.Delete,
Icon = @"pack://application:,,,/Asset/Delete.png",
};
Diagram.Menu.MenuItems.Add(item);