Class AutocompleteBehavior
This class presents a behavior for the autocomplete used in the ItemsControls.
Inheritance
Namespace: Telerik.Windows.Controls.Primitives
Assembly: Telerik.Windows.Controls.dll
Syntax
public class AutocompleteBehavior : Object
Constructors
AutocompleteBehavior()
Initializes a new instance of the AutocompleteBehavior class.
Declaration
public AutocompleteBehavior()
Properties
AllowCustomText
Gets or sets a value indicating whether a custom text is allowed.
Declaration
public bool AllowCustomText { get; set; }
Property Value
System.Boolean
|
AutoCompleteTimeout
Gets or sets the autocomplete timeout. When the timeout is over, the typed text for the autocomplete is reset.
Declaration
public static TimeSpan AutoCompleteTimeout { get; set; }
Property Value
System.TimeSpan
|
CurrentText
Gets the current text that is used for the autocomplete.
Declaration
public string CurrentText { get; }
Property Value
System.String
|
IsIndexSelectable
Gets or sets whether the item associated with the index is selectable.
Declaration
public Func<int, bool> IsIndexSelectable { get; set; }
Property Value
System.Func<System.Int32, System.Boolean>
|
ItemSearch
Gets or sets the ItemSearch for the autocomplete. The IItemSearchControl object defines the logic how the items are found with the retrievers.
Declaration
public IItemSearchControl ItemSearch { get; set; }
Property Value
IItemSearchControl
|
LastSelectionLength
Gets the last length of the selection.
Declaration
protected int LastSelectionLength { get; }
Property Value
System.Int32
|
LastSelectionStart
Gets the last selection start.
Declaration
protected int LastSelectionStart { get; }
Property Value
System.Int32
|
LastText
Gets the last text that is set.
Declaration
protected string LastText { get; }
Property Value
System.String
|
MatchingItem
Gets the matching item.
Declaration
public object MatchingItem { get; }
Property Value
System.Object
|
TextRetriever
Gets or sets the text Retriever that is used for autocomplete.
Declaration
public IValueRetriever TextRetriever { get; set; }
Property Value
IValueRetriever
|
TextSearchMode
Gets or sets the text search mode. Specifies how TextSearch will match items.
Declaration
public TextSearchMode TextSearchMode { get; set; }
Property Value
TextSearchMode
The text search mode. |
TextSource
Gets or sets the text source.
Declaration
public ITextSource TextSource { get; set; }
Property Value
ITextSource
|
Methods
ExtractCurrentText()
Extracts the current text from the current selection to its length.
Declaration
protected virtual string ExtractCurrentText()
Returns
System.String
|
IsFullMatch(Object)
Determines whether the matched item is found with full match or not.
Declaration
public bool IsFullMatch(object item)
Parameters
System.Object
item
The item. |
Returns
System.Boolean
|
SetCurrentText(String)
Sets a current text for the autocomplete.
Declaration
public bool SetCurrentText(string text)
Parameters
System.String
text
The text. |
Returns
System.Boolean
|
TextSourceSelectionChangeDetected()
This property is used to detect whether the test source selection change is detected or not.
Declaration
protected bool TextSourceSelectionChangeDetected()
Returns
System.Boolean
|
TextSourceTextChangeDetected()
This property is used to detect whether the test source text change is detected or not.
Declaration
protected bool TextSourceTextChangeDetected()
Returns
System.Boolean
|
UpdateCurrentText()
Updates the current text.
Declaration
protected bool UpdateCurrentText()
Returns
System.Boolean
|
UpdateTextSource(String, String)
Updates the text source according the current and matching item text.
Declaration
protected virtual void UpdateTextSource(string text, string matchingItemText)
Parameters
System.String
text
The current text. |
System.String
matchingItemText
The matching item text. |
UpdateTextSourceStateCache()
Updates the text source state cache.
Declaration
protected virtual void UpdateTextSourceStateCache()
Events
CurrentTextChanged
Occurs when current text is changed.
Declaration
public event EventHandler CurrentTextChanged
Event Type
System.EventHandler
|
MatchingItemChanged
Occurs when matching item is changed.
Declaration
public event EventHandler MatchingItemChanged
Event Type
System.EventHandler
|