title: Where should startup logic go in MVVM?
body: <p>I'm writing my first WPF application using MVVM, and I'm a confused about the role of the View Model and where I should put code that should run when the application is started.</p>
  
  <p>My application is very simple. It lists files from a remote location which the user can then select from to be copied to their own computer. When the application first starts it must determine the current source of files from a configuration file, read the current files at the source, and lists them to the user in the main window. If the configured file source can not be found then the user will be prompted to select a source.</p>
  
  <p>Should this logic go in the ViewModel? If so should it go in the constructor of the view model? This doesn't seem right because I don't want the ViewModel reading configuration files, and prompting the user anytime it is instantiated. </p>
  
  <p>If this were a WinForms application I would do this in the Form.Load or Form.Shown event.</p>