WPF 组合框搜索项 [英] WPF combobox search item

查看:30
本文介绍了WPF 组合框搜索项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法控制间隔的大小,当通过击键选择组合框中的项目时使用.例如.一个包含 {"12,"2} 的组合框:

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}:

按下 1 并快速按下 2. 选择列表中的第一项.按 1,等待几秒钟,按 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.

我想控制这个区间,这样情况2更有可能选择第一项..

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

问候,弗雷德里克

推荐答案

此行为受私有财产支配,我怀疑您能否更改它.

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));
    }
}

如您所见,这实际上取决于系统的 Doubleclick-Time.

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

这篇关于WPF 组合框搜索项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆