具有 Like 子句功能的自动完成文本框示例 %hello% C# Windows

AutoComplete TextBox with Features of Like Clause example %hello% C# Windows(具有 Like 子句功能的自动完成文本框示例 %hello% C# Windows)
本文介绍了具有 Like 子句功能的自动完成文本框示例 %hello% C# Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 TextBoxes 的 AutoComplete Suggest 模式属性使其自动完成,我想用它实现的是用户可以键入任何可以作为整个字符串的一部分的单词,并基于此它应该向我显示查找.

I am using TextBoxes's AutoComplete Suggest mode property to make it AutoComplete, What I want to achieve with it is a user can type any word which can pe part of the whole string and based on that It should show me the lookup.

将 TextBox AutoSuggest Source 设置为 Custom Source 并将 AutoSuggest 模式设置为 Suggest Mode 我只能获取那些以用户键入的单词开头的字符串的循环.

With TextBox AutoSuggest Source set to Custom Source and AutoSuggest mode set to Suggest Mode I can only get loopups for those string which starts with the word that user types.

有没有一种方法可以让我调整/覆盖这些属性的功能,或者有任何其他可用的选项.

Is there a way using which I can just tweak/override the functionality of these properties or is there any other option available.

我正在使用 C# - WinForms

I am using C# - WinForms

推荐答案

我认为最好的选择是创建自己的 IAutoComplete 实现.这是有关它的信息:http://msdn.microsoft.com/en-us/library/bb776292(VS.85).aspx

The best option I see would be to create your own implementation of IAutoComplete. Here is info on it: http://msdn.microsoft.com/en-us/library/bb776292(VS.85).aspx

如果您在 .net 反汇编程序中查看 System.Windows.Forms.dll,您会发现它在幕后使用 SHAutoComplete,该链接中也提到了它.

If you were to look at System.Windows.Forms.dll in a .net disassembler you will see that under the covers it is using SHAutoComplete, which is also mentioned in that link.

您还可以搜索一些创建自己的 IAutoComplete 实现的人的代码示例.

Also you can do some searches for some code samples of people creating their own IAutoComplete implementations.

如果您有其他想法,请告诉我.

Let me know if you come up with anything else.

这篇关于具有 Like 子句功能的自动完成文本框示例 %hello% C# Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)