views:

142

answers:

2

Does anyone know how to populate a DataFormComboBoxField from a regular list in SilverLight 3 beta? There seems to be no meaningful documentation or examples anywhere online.

Thanks ~Steve

+1  A: 

You can checkout http://www.microapplications.com/blog/archive/2009/05/07/330.aspx

VojTas
Usually something like that is achieved with only a couple of lines of code - it seems odd that populating a combobox requires so much code.
Steve French
A: 

Actually it turned out to be as simple as

private void dfEmailForm_Loaded(object sender, RoutedEventArgs e)
{
DataFormComboBoxField dfc = new DataFormComboBoxField();
dfc.ItemsSource = new List<string>() { "Type A", "Type B" };
dfc.ItemsSource = lstEmailType;
}

but it does have to the in the Loaded area for the dataform.

Steve French

related questions