Reputation: 1
Using Silverlight I have a dataform bound to table A and I need to fill a combobox of this dataform with data from table B. How can I declare this in the XAML code?
Upvotes: 0
Views: 119
Reputation: 2346
If your dataform is inside a UserControl which has a property called "TableBItems" for example, you could write:
<ComboBox SelectedItem={Binding FieldInTableA,Mode=TwoWay}
ItemsSource={Binding TableBItems, RelativeSource={RelativeSource AncestorType='UserControl'}}
DisplayMemberPath="FieldInTableBYouWantToShow"/>
Upvotes: 1