Class 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.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Editors")]
[ClassInterface(ClassInterfaceType.AutoDispatch)]
[ComVisible(true)]
public class RadAutoCompleteBox : RadTextBoxControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
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.
Declaration
public bool AllowDuplicates { get; set; }
Property Value
System.Boolean
|
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
System.Windows.Forms.AutoCompleteMode
|
Overrides
AutoCompleteTextBoxElement
Gets the associated RadAutoCompleteBoxElement that provides the core functionality for this control.
Declaration
protected RadAutoCompleteBoxElement AutoCompleteTextBoxElement { get; }
Property Value
RadAutoCompleteBoxElement
|
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
public string AutoCompleteValueMember { get; set; }
Property Value
System.String
|
DefaultSize
Gets the default size of the control.
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
|
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.
Declaration
public char Delimiter { get; set; }
Property Value
System.Char
|
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
public RadTokenizedTextItemCollection Items { get; }
Property Value
RadTokenizedTextItemCollection
|
PasswordChar
This property is not relevant for this class.
Declaration
public override char PasswordChar { get; set; }
Property Value
System.Char
|
Overrides
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.
Declaration
public bool ShowRemoveButton { get; set; }
Property Value
System.Boolean
|
UseSystemPasswordChar
This property is not relevant for this class.
Declaration
public override bool UseSystemPasswordChar { get; set; }
Property Value
System.Boolean
|
Overrides
Methods
CanEditElementAtDesignTime(RadElement)
Determines whether the specified element can be edited at design time.
Declaration
protected override bool CanEditElementAtDesignTime(RadElement element)
Parameters
RadElement
element
The element to check for design-time editing capability. |
Returns
System.Boolean
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
RadTextBoxControlElement
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 System.Windows.Forms.Control.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 System.Windows.Forms.Control.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 Type
TokenValidatingEventHandler
|