Table of Contents

Class MenuStyle

Namespace
Myra.Graphics2D.UI.Styles
Assembly
Myra.dll

Style class that defines the visual appearance of menu widgets.

public class MenuStyle : WidgetStyle
Inheritance
MenuStyle
Inherited Members

Constructors

MenuStyle()

Initializes a new instance of the MenuStyle class.

public MenuStyle()

MenuStyle(MenuStyle)

Initializes a new instance of the MenuStyle class by copying properties from another style.

public MenuStyle(MenuStyle style)

Parameters

style MenuStyle

The source menu style to copy from.

Properties

ImageStyle

Gets or sets the style applied to menu item icons.

[Browsable(false)]
public ImageStyle ImageStyle { get; set; }

Property Value

ImageStyle

LabelStyle

Gets or sets the style applied to menu item text labels.

[Browsable(false)]
public LabelStyle LabelStyle { get; set; }

Property Value

LabelStyle

SelectionBackground

Gets or sets the brush used for the background of selected menu items.

public IBrush SelectionBackground { get; set; }

Property Value

IBrush

SelectionHoverBackground

Gets or sets the brush used for the background of hovered menu items.

public IBrush SelectionHoverBackground { get; set; }

Property Value

IBrush

SeparatorStyle

Gets or sets the style applied to menu separator lines.

[Browsable(false)]
public SeparatorStyle SeparatorStyle { get; set; }

Property Value

SeparatorStyle

ShortcutStyle

Gets or sets the style applied to menu item shortcut key text.

[Browsable(false)]
public LabelStyle ShortcutStyle { get; set; }

Property Value

LabelStyle

SpecialCharColor

Gets or sets the color of the special character indicator (underscore) in menu item text.

public Color? SpecialCharColor { get; set; }

Property Value

Color?

Methods

Clone()

Creates a deep copy of this menu style.

public override WidgetStyle Clone()

Returns

WidgetStyle

A new MenuStyle instance with the same properties.