I'm just getting started with Oxygene.
I'm trying to make a litlle WPF project with a MVVM pattern. So far it's working but i can't find a way to implement commands in oxygene.
Does anyone know if this can be done and if so how?
I'm just getting started with Oxygene.
I'm trying to make a litlle WPF project with a MVVM pattern. So far it's working but i can't find a way to implement commands in oxygene.
Does anyone know if this can be done and if so how?
Copyright © 2021 Jogjafile Inc.
First you need to create a static class in the same project as the form is. like this:
Then you need to create a XAML name space alias (in the XAML of your form):
Suppose you have a button on the form and you want to hook it up to the command:
The next step is to setup what the command should be doing... In my case I just hooked up a lambda expression but you can use the MVVM pattern to delegate this behaviour to somewhere else.
I did this in the load of the form: