abdelwaheb ammar

abdelwaheb ammar

  • 1.3k
  • 456
  • 123.8k

link two windows in WPF + MVVM Light

Feb 16 2018 6:44 PM
Good evening, I try to link the window WPF "MainWindow" with another window WPF that I name it "window". I write this code with MVVMLight Toolkit:
ViewModel / MainViewModel.cs
  1. public class MainViewModel : ViewModelBase  
  2.    {  
  3.        public ICommand Save { getset; }  
  4. public MainViewModel()  
  5.        {  
  6. ave = new RelayCommand(CommandSave);  
  7.   
  8.        }  
  9. rivate void CommandSave()  
  10.        {  
  11. fenetre windows = new fenetre();  
  12.            windows.Show();  
  13.   
  14.        }  
  15.   
  16.   
  17.    }  
does this confirm the MVVM design pattern, or how can I fix it? 
 

Answers (2)