title: MVVM: Pass Parameter from viewmodel to view
body: <p>Im new to MVVM and XAML. Currently the application that I have to extend is some kind of imageviewer. It uses MVVM with a RelayCommand. Currently the code behind file of my XAML-file is almost empty. </p>
  
  <p>Data is displayed with databinding to the viewmodel and user interaction is bound with command to the model.</p>
  
  <p>But now I need to display an image that is an custom control. In XAML I have to place a Border-Control and than the control must be initialized in the code behind file. </p>
  
  <p>My question is how to do the setup when following MVVM.</p>
  
  <p>PseudoCode:</p>
  
  <pre><code>View{
  
  initPDFControl(){
  
  borderControl.DoMagic();
  };
  
  openImage(String path);
  }
  
  ViewModel{
  
  openImage(){
  
  getMyView.openImage(pathFromModel);
  }
  
  }
  </code></pre>
  
  <p>You can help me by linking me to helpful tutorials or note down some pseudocode.</p>