Menu
Note: You can check the Avalonia docs for the Menu API and Menu if you need more information.
For Avalonia.FuncUI's DSL properties you can check Menu.fs
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.
Usage
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 Menu 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
To add Icons to the menu item you just need to provide an Image, you can check this sample which uses an extension method defined in this file
Dispatch Actions From Menu Items
Last updated