我正在尝试将collectorDTO列表中的配置文件绑定到数据列表中的wpf中的Combobox,请在下面找到代码
List<CollectorDTO> cdlist = new List<CollectorDTO>();
cbProfile.ItemsSource = cdlist;
cbProfile.DisplayMemberPath = "Profile";
cbProfile.SelectedValuePath = "Profile";
收集器 DTO 包含以下带有 get set 方法的变量
private int _coldataId;
private string _profile;
private string _protocol;
private string _hosttype;
private string _host;
private string _uid;
private string _pwd;
private string _remdir;
private string _locdir;
private string _database;
private string _audittrail;
private string _skeleton;
private string _tmode;
private string _cmdstr;
private string _starttime;
private string _stoptime;
private int _period;
private string _addinfo;
请帮忙绑定数据?