I have 2 Classes in WPF:
- Meeting
- People
In meeting I have 2 ObservableCollections; AttendingMeeting and NotAttendingMeeting that contain People objects
In the xaml the DataContext are set to meeting, and I have 2 DataGrids (AttendingMeeting and NotAttendingMeeting)
I need to add a button to each of the DataGrids to add and remove from meeting, But then I need to change the DataContext on the button from e.g.: AttendingMeeting to Meeting, so that the Meeting class can handle the adding and removing People from the ObservableCollections.
How can I do this in xaml (changing the DataContext from AttendingMeeting items to the parents parent-> Meeting)?