WPF的combobox绑定数据 100
1个回答
2018-11-24 · 百度知道合伙人官方认证企业
关注
展开全部
private void Window_Loaded(object sender, RoutedEventArgs e)
{
List<City> list = new List<City>();
list.Add(new City { ID = 1, Name = "上海" });
list.Add(new City { ID = 2, Name = "北京" });
list.Add(new City { ID =3, Name = "天津" });
cmb_list.ItemsSource = list;
}
{
List<City> list = new List<City>();
list.Add(new City { ID = 1, Name = "上海" });
list.Add(new City { ID = 2, Name = "北京" });
list.Add(new City { ID =3, Name = "天津" });
cmb_list.ItemsSource = list;
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询