I have a MainWindow with some buttons that loads a collection:
You have two instances of ResultViewModel
, one in the MainWindowViewModel.ResultViewModel
property, the other directly assigned to the UserControl's DataContext:
<UserControl.DataContext>
<local:ResultViewModel />
</UserControl.DataContext>
Remove the above from the UserControl's XAML.
In general, a UserControl should never have its "own" view model, and you should never explicitly set its DataContext property in its XAML or code behind. Doing so overrides the value of the inherited DataContext, which contains the correct ResultViewModel instance.