Closed Kaiwen0418 closed 3 months ago
There is a menu item example in the control catalog if that helps: https://github.com/fsprojects/Avalonia.FuncUI/blob/1d562ee04b5a5fd81a526e8e483c058b46391afd/src/Avalonia.FuncUI.ControlCatalog/Avalonia.FuncUI.ControlCatalog/Views/Tabs/WindowMenuDemo.fs#L26
I think all those create
calls should be lower case though.
Thanks! That example works, and it will be good if someone can double-check the document page.
Hi, I was trying to use the menu control of FuncUI DSL, when I tried to run same code in doc, the
Create
method ofMenuItem
was reported undefined by IDE.Then I tried to use lower capital
create
like most of the other controls,I got the error
Type mismatch. Expecting a 'Avalonia.FuncUI.Types.IView list' but given a 'Avalonia.FuncUI.Types.IView<MenuItem> list'
from theMenu.viewItems menuItems
line.I am using net7.0 and Avalonia 11.0.2, and I am not sure if a version mismatch caused the error or if I didn't import the right dependency, it would be a great help if you could have a look at that.
Thanks!