Use converter on bound items in combobox

前端 未结 1 892
广开言路
广开言路 2020-12-25 11:07

i have a combobox which is bound to a datatable column like this:

ComboBox.DataContext = DataDataTable;                
ComboBox.DisplayMemberPath = DataData         


        
1条回答
  •  梦谈多话
    2020-12-25 12:03

    You can modify the ItemTemplate of the ComboBox and use your converter:

    
      
        
          
        
      
    
    

    Each item is bound to the items in the ItemsSource. By using the converter in the binding you are able to perform the conversion you want.

    0 讨论(0)
提交回复
热议问题