[英]Binding to the ItemSource
我正在尝试动态构建一个 AutoCompleteBox。 然后我想在我的项目源中使用客户列表,并且用户可视化 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 时做错了什么,还是应该使用其他属性?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.