问题
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