IMenuStripColorTable
The colours and arrow shape an ExtendedContextMenuStrip uses for text, submenu arrows
and check marks, beyond those a ProfessionalColorTable supplies.
public interface IMenuStripColorTable
Remarks
Implement it on a class that derives from ProfessionalColorTable
- the menu needs both: the base class for backgrounds, borders, the image margin and the highlight
behind the item under the pointer, and this interface for what is drawn on top of them. Pass an
instance to the ExtendedContextMenuStrip() constructor, or to a
control that takes one, such as the smart button's MenuStripColorTable.
"Selected" means the item under the pointer or chosen with the arrow keys.
Examples
public sealed class HighContrastMenuColours : ProfessionalColorTable, IMenuStripColorTable
{
public override Color ToolStripDropDownBackground => Color.Black;
public override Color ImageMarginGradientBegin => Color.Black;
public override Color ImageMarginGradientMiddle => Color.Black;
public override Color ImageMarginGradientEnd => Color.Black;
public override Color MenuItemSelected => Color.Yellow;
public Color ArrowColor => Color.Yellow;
public Color ArrowColorWhenItemSelected => Color.Black;
public Color MenuItemTextColor => Color.White;
public Color MenuItemTextColorWhenItemSelected => Color.Black;
public ArrowKind ArrowRenderingStyle => ArrowKind.Thick;
}Members at a glance
| Properties | |
|---|---|
ArrowColor | Gets the colour of submenu arrows and check marks on items that are not selected. |
ArrowColorWhenItemSelected | Gets the colour of the submenu arrow and check mark on the selected item. |
ArrowRenderingStyle | Gets the shape of the arrow drawn beside an item that opens a submenu. |
MenuItemTextColor | Gets the colour of an item's text while it is not selected. |
MenuItemTextColorWhenItemSelected | Gets the colour of the selected item's text. |
Properties
ArrowColor
Gets the colour of submenu arrows and check marks on items that are not selected.
See also
ArrowColorWhenItemSelected
Gets the colour of the submenu arrow and check mark on the selected item.
Remarks
Choose a colour that stands out against the selection highlight from
MenuItemSelected.
ArrowRenderingStyle
Gets the shape of the arrow drawn beside an item that opens a submenu.
- Value
ArrowKind.Thickfor the standard filled arrow, orArrowKind.Skinnyfor a thin line chevron.