In my application I am using a popup menu item when right clicking an object. I dynamically build up this menu using code like this:
ContextMenuStrip menu = new ContextMenuStrip();
menu.Items.Add(new ToolStripMenuItem("Item1", aNiceImage, someFunction));
menu.Items.Add(new ToolStripMenuItem("Item2", alsoNiceImage, someOtherFunction));
Now I want to set one of these menu items in bold (as it is recommended by the Windows User Experience Guidelines) to indicate which action corresponds with double clicking the object.
How do I do this?
use
item.Font = new Font(item.Font, item.Font.Style | FontStyle.Bold)to make bold effect to the current font.you can also auto select the default item as follows: