RadAutoCompleteBox
Represents a text box control with auto-completion functionality that tokenizes text by a specified delimiter. The control provides tokenized text representation and supports auto-completion suggestions from a data source.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Editors")]
[ClassInterface(ClassInterfaceType.AutoDispatch)]
[ComVisible(true)]
public class RadAutoCompleteBox : RadTextBoxControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadTextBoxControlRadAutoCompleteBox...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadAutoCompleteBox class with default settings.
public RadAutoCompleteBox()
Properties
Gets or sets a value indicating whether already selected items can be suggested again in the auto-completion list. When set to true, duplicate values can appear in suggestions even if they are already tokenized.
public bool AllowDuplicates { get; set; }
Gets or sets the auto-completion mode that controls how automatic completion works for the text box. This property determines whether suggestions are shown in a dropdown, appended to text, or both.
public override AutoCompleteMode AutoCompleteMode { get; set; }
Overrides:
Gets the associated RadAutoCompleteBoxElement that provides the core functionality for this control.
protected RadAutoCompleteBoxElement AutoCompleteTextBoxElement { get; }
Gets or sets the property name that will be used to extract values from data items in the auto-completion data source. This is useful when binding to complex objects where you want to display a specific property value.
[TypeConverter("System.Windows.Forms.Design.DataMemberFieldConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[Browsable(true)]
public string AutoCompleteValueMember { get; set; }
Gets the default size of the control.
protected override Size DefaultSize { get; }
Overrides:
Gets or sets the delimiter character used to tokenize the text input. When the user types this character, the preceding text is converted into a token.
public char Delimiter { get; set; }
Gets the collection of tokenized text items that have been created from the user input. Each item represents a piece of text that was separated by the delimiter character.
[Browsable(false)]
public RadTokenizedTextItemCollection Items { get; }
Gets or sets a value indicating whether the remove button should appear on tokenized text blocks. The text box must not be in read-only mode for the remove button to be functional.
public bool ShowRemoveButton { get; set; }
Methods
Determines whether the specified element can be edited at design time.
protected override bool CanEditElementAtDesignTime(RadElement element)
The element to check for design-time editing capability.
Returns:true if the element can be edited at design time; otherwise, false.
Overrides:
Creates and returns the text box element specific to the RadAutoCompleteBox control.
protected override RadTextBoxControlElement CreateTextBoxElement()
A new instance of RadAutoCompleteBoxElement.
Overrides:
Resets the background color theme overrides for the auto-complete text box element, restoring the default theme background color values.
protected override void ResetBackColorThemeOverrides()
Overrides:
Resets the foreground color theme overrides for the auto-complete text box element, restoring the default theme foreground color values and applying the theme to the element tree.
protected override void ResetForeColorThemeOverrides()
Overrides:
Sets the background color theme overrides for the auto-complete text box element across all visual states. This method applies the current BackColor to all available visual states.
protected override void SetBackColorThemeOverrides()
Overrides:
Sets the foreground color theme overrides for the auto-complete text box element across all visual states. This method applies the current ForeColor to all available visual states.
protected override void SetForeColorThemeOverrides()
Overrides:
Events
Occurs when text is being validated as a token before it is added to the Items collection. This event allows you to validate and potentially modify the token before it is created.
public event TokenValidatingEventHandler TokenValidating