WPF 组合框突出显示

发布于 2024-08-07 21:05:59 字数 139 浏览 1 评论 0原文

在 WPF 中,当我在组合框中输入一些文本时,它将突出显示以我输入的文本开头的项目。此突出显示将搜索我在组合框中输入的整个文本。但我希望文本搜索仅匹配第一个字母。如何做到这一点?

实际上,我想让 TextSearch.Text 始终成为第一个字符。

In WPF, when I enter some text in combobox, it will highlight the item starting with the text I entered. This highlighting will search the whole text i have entered in the combo box. But instead i want the text search to match only the first letter. How to do this?

Actually, I want to make TextSearch.Text to be always first character.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嗳卜坏 2024-08-14 21:05:59

我做过类似的事情。在博客文章上找到了一种操作方法,没有保存链接,但现在进行了新搜索并找到了这个,(根据我的记忆)看起来非常相似。

Ive done something similar to this. Found a sort of howto on a blog post, dont have the link saved but did a new search now and found this, which (from my memory) looks quite similar.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文