title: Can Pass View to ViewModel in MVVM?
body: <p>For my project I need to know which View is using my ViewModel </p>
  
  <p>So i created this ViewModel:</p>
  
  <pre><code>public class HistoriqueViewModel : INotifyPropertyChanged
  {
     public HistoriqueViewModel(MetroWindow view)
      {
          this.MetroWindow = view;          
          this.ExportCommand = new RelayCommand(Export_Ex);          
      }
  
      private MetroWindow _metroWindow;
      public MetroWindow MetroWindow
      {
          get { return _metroWindow; }
          set
          {
              if (Equals(value, _metroWindow)) return;
              _metroWindow = value;
              OnPropertyChanged();
          } 
     } 
     //.........
   }     
  </code></pre>
  
  <p>And in the View constructor:</p>
  
  <pre><code> public partial class ViewHisto : MetroWindow
  {
      public ViewHisto()
      {
          InitializeComponent();
          DataContext=new HistoriqueMV(this) ;
      }
  
   } 
  </code></pre>
  
  <p>It Work perfectly for me but I want to know if this Break the MVVM Pattern?  </p>