I was looking for best approach to set data context property. I found three ways
Assign data context on View (either on XAML or code behind).
As
the 4. way would be a DataTemplate.
i think the best approach is the one which fits best in your current situation.
if i have viewmodel first dynamic scenarios i use datatemplate/contentpresenter or with view first i take your way one and so on...