ClassRadAutoCompleteBox
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
RadAutoCompleteBox()
Initializes a new instance of the RadAutoCompleteBox class with default settings.
Declaration
public RadAutoCompleteBox()
Properties
AllowDuplicates
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.
AutoCompleteMode
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.
Declaration
public override AutoCompleteMode AutoCompleteMode { get; set; }
Property Value
Overrides
AutoCompleteTextBoxElement
Gets the associated RadAutoCompleteBoxElement that provides the core functionality for this control.
Declaration
protected RadAutoCompleteBoxElement AutoCompleteTextBoxElement { get; }
Property Value
AutoCompleteValueMember
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.
Declaration
[TypeConverter("System.Windows.Forms.Design.DataMemberFieldConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[Browsable(true)]
public string AutoCompleteValueMember { get; set; }
Property Value
DefaultSize
Gets the default size of the control.
Declaration
protected override Size DefaultSize { get; }
Property Value
Overrides
Delimiter
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.
Items
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.
Declaration
[Browsable(false)]
public RadTokenizedTextItemCollection Items { get; }
Property Value
ShowRemoveButton
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.
Methods
CanEditElementAtDesignTime(RadElement)
Determines whether the specified element can be edited at design time.
Declaration
protected override bool CanEditElementAtDesignTime(RadElement element)
Parameters
element
The element to check for design-time editing capability.
Returns
true if the element can be edited at design time; otherwise, false.
Overrides
CreateTextBoxElement()
Creates and returns the text box element specific to the RadAutoCompleteBox control.
Declaration
protected override RadTextBoxControlElement CreateTextBoxElement()
Returns
A new instance of RadAutoCompleteBoxElement.
Overrides
ResetBackColorThemeOverrides()
Resets the background color theme overrides for the auto-complete text box element, restoring the default theme background color values.
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
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.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
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.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
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.
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
Events
TokenValidating
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.
Declaration
public event TokenValidatingEventHandler TokenValidating
Event Value