c# – How can I implement Windows close in MVVM pattern?

I’m newer to MVVM design pattern with WPF .Net Framework

I have a :

  • Model ( Student )
  • View Model (StudentViewModel )
  • RelayCommands
  • MainWindow.xaml.cs
  • MainWindow.xaml

Everything works fine and I have bonded WPF Commands to the button,
I have a button called Exit that will close the window in MainWindow

Actually, I’m so confused about how can implement this.close() in the button Exit using Commands that inherit from RelayCommand??!

How can I do that?