LocateForModel explain context vs. viewmodel

Topics: Conventions, Framework Services, Getting Started, UI Architecture
Nov 16, 2011 at 10:15 PM

I am just not groccing context and viewmodel when using LocateForModel (which seems to be essential for view caching). 

Is Context my datacontext? Is context some sort of key that identifies my screen (i.e. a file path in a text editor)? What are some scenarios where I'd set my viewmodel and context to something different?

While I'm asking can you explain displayLocation as well? Is display location simply the location where the created view model will be shown?

I am asking this because I am integrating Caliburn with Prism (no choice in the matter... too much code in Prism) and Prism is in charge of showing windows instead of the window manager. So I am writing code to teach regions to play nicely with views (but I need to be able to consistently associate a view to a viewmodel and a region. Understanding how LocateForModel works seems to be critical to getting this to work.