WPF combobox search item

房东的猫 提交于 2019-12-24 10:48:52

问题


Is there any way to control the size of the interval, that is used when selected an item in a combobox via keystrokes. E.g. a combox contains {"12,"2}:

Pushing 1 and quickly 2. Selects the first item in the list. Pushing 1, wait a few seconds, push 2. Selects the second item.

I would like to control this interval, such that case 2 is more likely to select the first item..

Regards, Fredrik


回答1:


This behavior is governed by a private property, i doubt that you can change it.

// System.Windows.Controls.TextSearch
private TimeSpan TimeOut
{
    get
    {
        return TimeSpan.FromMilliseconds((double)(SafeNativeMethods.GetDoubleClickTime() * 2));
    }
}

As you can see this is actually dependent on the system's Doubleclick-Time.



来源:https://stackoverflow.com/questions/6042861/wpf-combobox-search-item

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!