Menu
Last updated
Last updated
Note: You can check the Avalonia docs for the and if you need more information.
For Avalonia.FuncUI's DSL properties you can check
The menu control allows you to add a list of buttons in a horizontal manner which supports sub-items, it's usually put at the top of the application inside a DockPanel, but it can be placed anywhere in the application.
Top-Level Menu Items
To create top-level navigation menus you just need to provide a list of MenuItem
controls and use the .viewItems
property on the control
Set Sub-Menus
Each MenuItem can contain MenuItems themselves if you need a sub-menu you just need to provide the appropriate children
Set Icons
Dispatch Actions From Menu Items
To add Icons to the menu item you just need to provide an , you can check this which uses an extension method defined in