private ObservableCollection<string> _metadataFieldList = new ObservableCollection<string>(); public ObservableCollection<string> MetadaFieldList { get { return _metadataFieldList; } set { _metadataFieldList = value; } }
List<string> lst = new DirectoryInfo(fullFolderPath).GetDirectories("*", SearchOption.AllDirectories) .Select(x => x.FullName).ToList(); model.MetadaFieldList = new ObservableCollection<string>(lst);
<DataGridTemplateColumn Width="Auto"> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <ComboBox SelectedValue="{Binding Path=FieldName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding Path=MetadaFieldList}"> </ComboBox> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn>
ItemsSource="{Binding DataContext.TaxonomyList, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, UpdateSourceTrigger=PropertyChanged}"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)