Table of Contents

Class VerticalMenu

Namespace
Myra.Graphics2D.UI
Assembly
Myra.dll

A menu control that displays menu items vertically in a column.

public class VerticalMenu : Menu, IItemWithId, INotifyAttachedPropertyChanged
Inheritance
VerticalMenu
Implements
Inherited Members

Constructors

VerticalMenu(Stylesheet, string)

Initializes a new instance of the VerticalMenu class with the specified stylesheet and style.

public VerticalMenu(Stylesheet stylesheet, string styleName = "")

Parameters

stylesheet Stylesheet

The stylesheet to use for applying the style.

styleName string

The name of the style to apply. Defaults to the default stylesheet style.

VerticalMenu(string)

Initializes a new instance of the VerticalMenu class with the specified style.

public VerticalMenu(string styleName = "")

Parameters

styleName string

The name of the style to apply. Defaults to the default stylesheet style.

Properties

HorizontalAlignment

Gets or sets the horizontal alignment of the menu.

public override HorizontalAlignment HorizontalAlignment { get; set; }

Property Value

HorizontalAlignment

Orientation

Gets the orientation of the menu, which is always vertical.

public override Orientation Orientation { get; }

Property Value

Orientation

VerticalAlignment

Gets or sets the vertical alignment of the menu.

public override VerticalAlignment VerticalAlignment { get; set; }

Property Value

VerticalAlignment

Methods

OnKeyDown(Keys)

Handles keyboard input for vertical menu navigation using up and down arrow keys.

public override void OnKeyDown(Keys k)

Parameters

k Keys

The key being pressed.