views:

16

answers:

1

Hi, I have a problem binding data to a combobox that's in a secondary (not initially focused) tab. Basically, I have a silverlight form with multiple tabs, whenever I move this combobox to the first (main) tab, the data is loaded and everything works as expected, but when this combo box is in a secondary tab that doesn't have focus initially on first load, the combo box has no data, however, if I data bind the combo box using c# in the code behind it has data! Any ideas on how to solve this?

My binding in XAML (this doesn't work)

<ComboBox x:Name="MyComboBox"  Height="24" Width="149"
          ItemsSource="{Binding Path=MyList}" DisplayMemberPath="Name"  />
A: 

MyList is most likely empty when it's first bound. Try using an event that is available when you switch to the next tab, to load MyList

jeffo