Hi, My knowledge of WPF UserControl is like an hour. So please forgive me if there are many lessons or answers to SO on this question (Honestly, I don’t think it can be done, and you will need to redo the code ... hence why I thought I was asking)
So, before creating UserControl, I had a datagrid that wraps clients based on the text entered by the user in the text box. Once discovered, the SelectedItem of this DataGrid filter is then used to bind to a new DataGrid containing the new collection.
So....
DataGrid XAML Filter
SelectedItem="{Binding SelectedCustomer, Mode=TwoWay}"
ItemsSource="{Binding Source={StaticResource cvsCustomers}}"
As soon as the User selects the Customer in this grid,
new DataGrid will contain property rows based on SelectedCustomer
ItemsSource="{Binding SelectedCustomer.CustomerOrders}"
, .
, " " , UserControl, DataGrid.
UserControl , , , selectedItem Usercontrol, DataGrid . ( )
- DataGrid .
ItemsSource="{Binding ElementName=myUserControl, Path=SelectedCustomer.CustomerOrders}"
, , , . - , .