Accessing Function from Nested UI File - Avalonia
Ok so I have the following file structure for my Avalonia MVVM project
In my FileMenu.axaml file I have a menu option
I know to bind it to a command I would do
however, the exit function is in my MainWindowViewModel. So I have two questions.
In my FileMenu.axaml file I have a menu option
I know to bind it to a command I would do
however, the exit function is in my MainWindowViewModel. So I have two questions.
- Is it ok if I put the exit command in the FileMenu.axaml.cs file to exit the program?
- If not, do I create a ViewModel file in the same directory as the FileMenu.axaml file and then call that code behind for all of my nested menu options?