Table of Contents

Class HorizontalMenu

Namespace
Myra.Graphics2D.UI
Assembly
Myra.dll

A menu control that displays menu items horizontally in a row.

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

Constructors

HorizontalMenu(Stylesheet, string)

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

public HorizontalMenu(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.

HorizontalMenu(string)

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

public HorizontalMenu(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 horizontal.

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 horizontal menu navigation using left and right arrow keys.

public override void OnKeyDown(Keys k)

Parameters

k Keys

The key being pressed.