C
C#10mo ago
Ploot

Cleaner NavigationView implementation (Avalonia)

I'm currently porting an existing project that i didn't write from WinUI3 to Avalonia. The project I'm porting used NavigationMenu to change between pages and as I am trying to keep this project as close to the original as possible I'm using FluentAvalonia's implementation of NavigationMenu, However I wasn't particularly happy with the code behind for switching pages and upon searching it seems every example I could find uses the same method of using a switch statement to navigate to a typeof(<type>) based on the items tag. This feels really clumsy and was wondering if there's a cleaner way of binding each NavigationViewItem to a type/view?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server