如何让ComboBox
自动下拉,
鼠标在WPF中输入?
答案 0 :(得分:0)
在WPF中,设置IsDropDownOpen
属性可以做到
XAML:
<ComboBox Name="cb" IsEditable="True" MouseEnter="Cb_OnMouseEnter"/>
代码:
private void Cb_OnMouseEnter(object sender, MouseEventArgs e)
{
cb.IsDropDownOpen = true;
}
-
在winform中设置DroppedDown
属性。
cbo.DroppedDown = true;
通过此链接:
How to make combo box auto expand on mouse hover and close when the mouse leaves combo box in c#?