Binding a dependency property to another dependency property
Posted
by Rire1979
on Stack Overflow
See other posts from Stack Overflow
or by Rire1979
Published on 2010-06-07T20:50:50Z
Indexed on
2010/06/08
6:52 UTC
Read the original article
Hit count: 437
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?
© Stack Overflow or respective owner