C# WPF ComboBox - Exclude last row (or Blank Space) of Binding Data (binding from Microsoft Access)

前端 未结 3 1606
你的背包
你的背包 2021-01-16 07:59

Currently I am using Microsoft Access to keep the data and it will bind to WPF combobox. Below code was working almost fine.

oleDBCommand.CommandText =

\"SE         


        
3条回答
  •  我在风中等你
    2021-01-16 08:26

    This might be an old thread but I had the same issue with ComboBox. The thing is ComboBox align items to the TOP so it's not an extra item or line. It's just the space left after publishing your items. So let's say if your combobox height is 37 px and height of each item is 10px then you will see that last space of 7 px. Try keeping the height of combobox same as that of its individual elements.

     
        
            
        
    

提交回复
热议问题