I am trying to bind to a collection of controls that I generate dynamically:
<ItemsControl ItemsSource="{Binding CustomFields}">
And the code:
public ObservableCollection<Control> CustomFields
{
get
{
return GetCustomFields();
}
}
Getcustomfields simply generates some controls like ComboBox, text field, etc. Binding seems to work, but no controls appear in the window. Probably because I need a data item in the controls. My question is, what type of data do I need?
Thanks for any help
source
share