I have a Page that has three child UserControls. I set the DataContext viewmodel resource in the parent Page and the three child controls reference the parents DataContext because all 3 child user controls use the same ViewModel. All good.
However, one of the UserControls is having binding problems (I can see this because of the new XAML debugging feature in Silverlight 5 Beta.) The UserControl in question is an ItemsControl. Inside each Item is a button and 2 text boxes. That button is bound to a Command. The error is that the Button cannot find its binding. The 2 textboxes are binding correctly. The ItemSource of the ItemsControl is bound to a ObservableCollection in the viewmodel.
My Question is this: How can I tell the Button to look for its binding "at a higher level" than the Observable Collection ie: Go to the view model, not your direct parent (the Observable Collection). You can't set the DataContext for the button in the ChildControl because the reference to the view model isnt there. It's in the parent.