You should be able to just pass the counterpartiesDataView
as the DataContext
to your UserControl
<DockPanel>
<DockPanel>
<GUI:Counterparties_UserInputs x:Name="UserInputs" DataContext="{Binding Source={StaticResource counterpartiesDataView}}" />
And set the ItemSource of your UserControl
<DataGrid Name="CounterpartiesGrid" ItemsSource="{Binding}" />
However idf you UserControl
is already using its DataContext
for something else you can use FindAncestor
to find the Parent and bind to one of its properties.
<DataGrid Name="CounterpartiesGrid" ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type UserControl}},Path=CounterpartiesData}">