How to aggregate bindings in Silverlight UserControl
Posted
by Peter Wone
on Stack Overflow
See other posts from Stack Overflow
or by Peter Wone
Published on 2010-02-05T10:12:53Z
Indexed on
2010/04/01
0:53 UTC
Read the original article
Hit count: 581
Imagine a UserControl containing some sort of ItemsControl. The UserControl as a whole has a DataContext, but you also need to expose the ItemsSource of the ItemsControl.
I have tried all manner of arrangements, and eventually passed a DomainDataSource as a UserControl dependency property named DDS, and bound the ItemsControl like this:
ItemsSource="{Binding DDS.Data, ElementName=userControl}"
It works, but this is mucky, and with Silverlight mucky is nearly always a sign of incorrect approach. Your advice is sought.
It looks like multi-bindings might be the answer to this.
© Stack Overflow or respective owner