I read this article http://msdn.microsoft.com/en-us/magazine/hh852595.aspx to try to understand data binding in WPF. But it only takes about how to bind data context in code.
ContentPanel.DataContext = _currentPerson;
I have this Item page xaml. I don't understand how does DataContext is being setup. What is the difference between DataContext attribute and d:DataContext attribute?
<Page
x:Class="Myapp.ItemPage"
DataContext="{Binding DefaultViewModel.Item, RelativeSource={RelativeSource Self}}"
d:DataContext="{Binding Groups[0].Items[0], Source={d:DesignData Source=../OneList.Shared/DataModel/SampleData.json, Type=data:SampleDataSource}}"
>
...
</Page>