skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class AutocompleteBehavior

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

Inheritance
System.Object
AutocompleteBehavior
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

Extension Methods

CollectionExtensions.ToEnumerable<T>(T)
EnumerableExtensions.ToEnumerable<T>(T)
Getting Started
  • Install Now
  • Demos
  • SDK Samples Browser
  • Sample Applications
Support Resources
  • Code Library
  • Knowledge Base
  • MVVM Support
  • Videos
  • GitHub SDK Repository
Community
  • Forums
  • Blogs
  • XAML Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.