The beginner tutorial I've followed said I should create a namespace on the window,
<Window ... xmlns:vm="clr-namespace:MyApp.ViewModels" />
And then set the DataContext like this,
<Window.DataContext>
<vm:MyViewModel />
</Window.DataContext>
But I don't want the DataContext to apply to the whole window. I want different elements to use different contexts.
My DataGrid is defined like,
<DataGrid ... DataContext="{Binding}" ItemsSource="{Binding Path=Queue}"
I guess that DataContext="{Binding}"
bit basically uses "use parent context", but couldn't I set it to vm:MyViewModel
right in there? I'm not sure of the proper syntax and the Visual Studio Properties window seems pretty useless in the matter.