Docs / UI

Glossary: ContextMenuStyle

The members of ContextMenuStyle, in alphabetical order.

Color legend plain property dependency property method

The style class of ContextMenu: the properties a style can set on it. Part styles BorderStyle, ListBoxStyle, CheckIconStyle and ExpandIconStyle (ImageStyle). Leaves out ItemsSource. Framework defaults: aligned left and top, HitTest off, Placement BottomRight. A border 1 unit thick in the context menu colors of DefaultSettings; a transparent list without dual colors whose hover and selected rows use DefaultContextMenuHighlightColor; an 8 by 8 check icon and a 6 by 8 expand icon in DefaultContextMenuIconColor.

A class deriving from BaseStyle. The styles page shows it in context.

Names are colored by what they are: a property, a method or an event; values and fields keep the plain color.

Properties

BorderStyle 馃爢

BorderStyle 路 The style of the border around the items. By default a white background with a 1 unit dark gray border.

CheckIconStyle 馃爢

ImageStyle 路 The style of the check mark of a checked item. By default an 8 by 8 unit dark gray square.

ExpandIconStyle 馃爢

ImageStyle 路 The style of the arrow of an item with a sub-menu. By default a 6 by 8 unit dark gray block at the right end; with a Source it is that picture, as in the screenshot.

ListBoxStyle 馃爢

ListBoxStyle 路 The style of the list of the items. By default transparent rows, highlighted in light blue under the mouse and when selected.

MarginFromMouseCursor 馃爢

Margin 路 An offset added to the point the menu opens at: Left to the x, Top to the y, in units.

Placement 馃爢

ContextMenuPlacement 路 On which side of the point the menu opens. BottomRight by default.

ContextMenuSubMenusOpenType 路 Whether the sub-menus of this menu鈥檚 items open on hover (OnHover, the default) or on click.

Methods

ContextMenuStyle()

ContextMenuStyle()

IsSet() 馃爢

IsSet(string propertyName) 路 Whether the property is assigned to this style, so the style applies it. Pass the name with nameof; an unknown name gives false.

Parameter Type Description
propertyName string The name of a property of the style; nameof keeps it right.