Closed Jolvera2001 closed 1 week ago
Not at PC right now, but looking at MAUI documentation, you just need MenuBarItem →MenuFlyoutItem/MenuFlyoutSubItem, why are you using the MenuFlyout? Also the window object is not strictly required.
https://learn.microsoft.com/en-us/dotnet/maui/user-interface/menu-bar?view=net-maui-8.0
So I simplified it and got this. The menu doesn't show up still, but let me know if I'm still not doing something correctly. I know in the Maui documentation is shows ContentPage -> ContentPage.MenuBarItems and then -> MenuBarItem -> ...
Not sure if the ContentPage.MenuBarItems is just implicitly done since in the Reactorui documentation it shows the flow of MenuBarItem -> MenuFlyoutItem/MenuFlyoutSubItem -> ...
using MauiReactor;
namespace AudioPlayer.Pages;
class MainPage : Component
{
public override VisualNode Render()
=> ContentPage(
MenuBarItem(
MenuFlyoutItem(
MenuFlyoutSubItem().Text("Yes")
).Text("Flyout Item 1")
).Text("Item 1")
);
}
Also as a heads up, I am using VSCode and its hot reload function for this if it makes any difference.
hum, seems working to me:
Are you sure you're hosting the ContentPage inside a NavigationPage or Shell?
That's something I missed completely, entirely my fault honestly. I wasn't using a Navigation Page or Shell within the project. I'll make sure to read the documentation instead of skimming it from now on though so thank you! It's working as intended now
no problem, you're welcome
Hi @adospace, I've been really enjoying Reactorui and I'm hoping to make a few small projects with it soon! This is a really great UI framework with a lot of potential so keep up the good work!
I had an issue creating menus within a desktop application. Here is my code:
Let me know if I'm doing something wrong or if there's some issue with this.