我正在尝试动态构建AutoCompleteBox。然后我想在我的itemsource中使用一个Clients列表,用户可以看到DescClient字段。
List<Client> clients = ClientAction.getClientsFromUsers(Environment.UserName);
(field as AutoCompleteBox).ItemsSource = clients;
//CLIENT MEMBERS
private int idClient;
private string descClient;
private int idGroup;
private User user;
已经尝试过:
(field as AutoCompleteBox).ValueMemberPath = "DescClient"
但没有显示任何内容。我是在做错误的感染ValueMemberPath还是应该使用另一个Proprety?