Creating a ViewModel : do it before or after model data is available?

Posted by Schneider on Stack Overflow See other posts from Stack Overflow or by Schneider
Published on 2010-04-22T07:37:52Z Indexed on 2010/04/22 7:43 UTC
Read the original article Hit count: 173

Filed under:

I have a WPF application that loads data from a data source.

Until some data is loaded there is nothing to display.

My question is do I:

  • Create both V and VM before any data is available; set the data in the VM once available
  • Create only V at the start; wait until data available then create the VM injecting the data
  • Create both V and VM only once data available

© Stack Overflow or respective owner

Related posts about mvvm