Binding a dependency property to another dependency property
- by Rire1979
Take this scenario where I am working with a grid like control:
<RadGrid DataContext={Binding someDataContextObject, Mode=OneWay}>
<RadGrid.columns>
<RadGrid.Column Header="Column Header"
DataMember="{Binding dataContextObjectProperty, Mode=OneWay}">
[...]
<DataTemplate>
<MyCustomControl Data="{Binding ???}" />
</DataTemplate>
<\RadGrid.Column>
</RadGrid.columns>
</RadGrid>
I would like to bind the Data dependency property of MyCustomControl to the DataMember dependency property of the column to avoid multiple bindings to the same data. How do I do it?