Hi,
this is going to be quick question. I want to create a user control that would do something like this:
<ctrl:MyControl x:Name="mc">
<ctrl:MyControl.MyData>
<ctrl:MyDataCollection>
<ctrl:MyData MyProperty="{Binding PropertyA}"/>
<ctrl:MyData MyProperty="{Binding PropertyB}"/>
</ctrl:MyDataCollection>
</ctrl:MyControl.MyData>
</ctrl:MyControl>
MyControl is UserControl,
MyControl.MyData is DependencyProperty of type MyDataCollecion inside MyControl,
MyDataCollecion is List<MyData>,
MyData is DependencyObject, MyProperty is dependency property
Is such thing possible in WPF?
I Believe that it would lose connection to logical tree in MyData, so the result would be MyData added to MyDataCollection, but MyProperty wouldn't be bound.
Any ideas how I can achieve something like that?