Add comboBox items from code behind. [WPF]

前端 未结 3 1088
一整个雨季
一整个雨季 2021-01-12 19:06

I grabbed this code from MSDN. What Im trying to do is similar, but use a list instead of three different strings. so say

List strList = new Li         


        
3条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-12 19:50

    You can use data binding. Data binding allows you to bind the dynamic data from your list to the combobox and have it generated and filled with the content you are passing through.

    Binding WPF Combobox to a Custom List

提交回复
热议问题