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
stylesheetStylesheetThe stylesheet to use for applying the style.
styleNamestringThe 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
styleNamestringThe 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
Orientation
Gets the orientation of the menu, which is always horizontal.
public override Orientation Orientation { get; }
Property Value
VerticalAlignment
Gets or sets the vertical alignment of the menu.
public override VerticalAlignment VerticalAlignment { get; set; }
Property Value
Methods
OnKeyDown(Keys)
Handles keyboard input for horizontal menu navigation using left and right arrow keys.
public override void OnKeyDown(Keys k)
Parameters
kKeysThe key being pressed.