Class AutoCompleteMatchItemEventArgs
Event data for the MatchItem event.
Inheritance
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class AutoCompleteMatchItemEventArgs : CancelEventArgs
Remarks
This class provides the contextual information passed to handlers when the AutoComplete control evaluates a candidate entry in manual match mode (Manual). It supplies both the current text being entered and the candidate match string that is compared against it.
The associated delegate type is AutoCompleteMatchItemEventHandler, which consumes instances of this class. Because it derives from System.ComponentModel.CancelEventArgs, handlers can set System.ComponentModel.CancelEventArgs.Cancel to control whether the candidate should be accepted or ignored. By default, the cancel state is false, meaning the candidate is rejected unless the handler explicitly sets it to true. This allows developers to implement custom matching logic, culture-aware comparisons, or application-specific rules when deciding whether to accept a suggestion.
Constructors
AutoCompleteMatchItemEventArgs(String, String)
Creates a new object of type AutoCompleteMatchItemEventArgs.
Declaration
public AutoCompleteMatchItemEventArgs(string currentText, string possibleMatch)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | currentText | The current text to be matched. |
| System.String | possibleMatch | The possible match string. |
Remarks
This constructor for the AutoCompleteMatchItemEventArgs class takes the current text of the target control that is to be matched and the possible match string that it is to be compared against as arguments. The values set through this constructor can overriden through the CurrentText and PossibleMatch properties.
Properties
CurrentText
Returns the current text value to be matched.
Declaration
public string CurrentText { get; }
Property Value
| Type |
|---|
| System.String |
Remarks
The current text that is to be compared against for possible matches. This is done one at a time using this event argument. The possible match for this is accessed through the PossibleMatch property. You can set the CurrentText and PossibleMatch properties using the appropriate constructor.
PossibleMatch
Returns the possible match value that needs to be compared against the CurrentText property by the event handler.
Declaration
public string PossibleMatch { get; }
Property Value
| Type |
|---|
| System.String |
Remarks
The current text that this possible match will be checked against is accessed through the CurrentText property. You can set the CurrentText and PossibleMatch properties using the appropriate constructor.