Posted 13 years ago
by Moondance
My xaml looks somewhat like :
<UserControl x:Name ="MyUserControl" >
......
<PropertyGrid x:Name="MyPropertyGrid"
SelectedObjects="{Binding Path=MyItems}"
....
<PropertyGrid.DataFactory>
<MyDataFactory/>
</PropertyGrid.DataFactory>
</UserControl>
I have a class (MyDataFactory) derived from DataFactory.
In my MyDataFactory I want to have a variable that points to the usercontrol "MyUserControl" or, better, its DataContext.
How can I pass this information to my class? Through a constructor?
Help is appreciated.
<UserControl x:Name ="MyUserControl" >
......
<PropertyGrid x:Name="MyPropertyGrid"
SelectedObjects="{Binding Path=MyItems}"
....
<PropertyGrid.DataFactory>
<MyDataFactory/>
</PropertyGrid.DataFactory>
</UserControl>
I have a class (MyDataFactory) derived from DataFactory.
In my MyDataFactory I want to have a variable that points to the usercontrol "MyUserControl" or, better, its DataContext.
How can I pass this information to my class? Through a constructor?
Help is appreciated.