Posted 12 years ago
by Moondance
![Avatar](https://secure.gravatar.com/avatar/c43f7ff1b6b2e7cf03bc53f7767b4b55.jpg?s=64&d=identicon&r=g)
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.