Class
AutocompleteBehavior

This class presents a behavior for the autocomplete used in the ItemsControls.

Definition

Namespace:Telerik.Windows.Controls.Primitives

Assembly:Telerik.Windows.Controls.dll

Syntax:

cs-api-definition
public class AutocompleteBehavior

Inheritance: objectAutocompleteBehavior

Constructors

AutocompleteBehavior()

Initializes a new instance of the AutocompleteBehavior class.

Declaration

cs-api-definition
public AutocompleteBehavior()

Properties

AllowCustomText

Gets or sets a value indicating whether a custom text is allowed.

Declaration

cs-api-definition
public bool AllowCustomText { get; set; }

Property Value

bool

AutoCompleteTimeout

Gets or sets the autocomplete timeout. When the timeout is over, the typed text for the autocomplete is reset.

Declaration

cs-api-definition
public static TimeSpan AutoCompleteTimeout { get; set; }

Property Value

TimeSpan

CurrentText

Gets the current text that is used for the autocomplete.

Declaration

cs-api-definition
public string CurrentText { get; }

Property Value

string

IsIndexSelectable

Gets or sets whether the item associated with the index is selectable.

Declaration

cs-api-definition
public Func<int, bool> IsIndexSelectable { get; set; }

Property Value

Func<int, bool>

ItemSearch

Gets or sets the ItemSearch for the autocomplete. The IItemSearchControl object defines the logic how the items are found with the retrievers.

Declaration

cs-api-definition
public IItemSearchControl ItemSearch { get; set; }

Property Value

IItemSearchControl

LastSelectionLength

Gets the last length of the selection.

Declaration

cs-api-definition
protected int LastSelectionLength { get; }

Property Value

int

LastSelectionStart

Gets the last selection start.

Declaration

cs-api-definition
protected int LastSelectionStart { get; }

Property Value

int

LastText

Gets the last text that is set.

Declaration

cs-api-definition
protected string LastText { get; }

Property Value

string

MatchingItem

Gets the matching item.

Declaration

cs-api-definition
public object MatchingItem { get; }

Property Value

object

TextRetriever

Gets or sets the text Retriever that is used for autocomplete.

Declaration

cs-api-definition
public IValueRetriever TextRetriever { get; set; }

Property Value

IValueRetriever

TextSearchMode

Gets or sets the text search mode. Specifies how TextSearch will match items.

Declaration

cs-api-definition
public TextSearchMode TextSearchMode { get; set; }

Property Value

TextSearchMode

The text search mode.

TextSource

Gets or sets the text source.

Declaration

cs-api-definition
public ITextSource TextSource { get; set; }

Property Value

ITextSource

Methods

ExtractCurrentText()

Extracts the current text from the current selection to its length.

Declaration

cs-api-definition
protected virtual string ExtractCurrentText()

Returns

string

IsFullMatch(object)

Determines whether the matched item is found with full match or not.

Declaration

cs-api-definition
public bool IsFullMatch(object item)

Parameters

item

object

The item.

Returns

bool

SetCurrentText(string)

Sets a current text for the autocomplete.

Declaration

cs-api-definition
public bool SetCurrentText(string text)

Parameters

text

string

The text.

Returns

bool

TextSourceSelectionChangeDetected()

This property is used to detect whether the test source selection change is detected or not.

Declaration

cs-api-definition
protected bool TextSourceSelectionChangeDetected()

Returns

bool

TextSourceTextChangeDetected()

This property is used to detect whether the test source text change is detected or not.

Declaration

cs-api-definition
protected bool TextSourceTextChangeDetected()

Returns

bool

UpdateCurrentText()

Updates the current text.

Declaration

cs-api-definition
protected bool UpdateCurrentText()

Returns

bool

UpdateTextSource(string, string)

Updates the text source according the current and matching item text.

Declaration

cs-api-definition
protected virtual void UpdateTextSource(string text, string matchingItemText)

Parameters

text

string

The current text.

matchingItemText

string

The matching item text.

UpdateTextSourceStateCache()

Updates the text source state cache.

Declaration

cs-api-definition
protected virtual void UpdateTextSourceStateCache()

Events

CurrentTextChanged

Occurs when current text is changed.

Declaration

cs-api-definition
public event EventHandler CurrentTextChanged

Event Value

EventHandler

MatchingItemChanged

Occurs when matching item is changed.

Declaration

cs-api-definition
public event EventHandler MatchingItemChanged

Event Value

EventHandler