Assistance with code #19453
Replies: 1 comment 2 replies
-
It sounds like you want a router? There is some docs for using the ReactiveUI one here. https://docs.avaloniaui.net/docs/concepts/reactiveui/routing But making your own from scratch is fairly simple.
Typically you would logically break it up into several view models and views. That way you adhere to single responsibility principle. But it really depends on what you are trying to do and how complicated it is. If you are also strongly following MVVM, your view models should not contain any application logic. They are just meant to wrap models so the view can bind to them. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been working on an Inventory Application to get some practice with Avalonia. One thing that I have been having trouble with is Bindings, specifically commands. I was able to set up switching pages from the MainViewModel. However struggling with doing it from other pages. For example, from my wasted page to the New Product page. Here is a link to my current project. https://github.com/blazethrower320/InventoryTracker ( Beware your eyes )
Side Note, Right now, most of my code is inside my ViewModelBase since I was able to easily access it by implementing it into other classes. I'm guessing it's supposed to be put into other files?
If possible, would anyone be willing to give me a hand via Discord? If so, my Discord is blazethrower320
Beta Was this translation helpful? Give feedback.
All reactions