Represents a auto-complete tokenized text box element
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadAutoCompleteBoxElement : RadTextBoxControlElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementScrollViewElement<TextBoxViewElement>RadTextBoxControlElementRadAutoCompleteBoxElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadAutoCompleteBoxElement class.
public RadAutoCompleteBoxElement()
Properties
Gets or sets whether already selected items can be suggested.
public virtual bool AllowDuplicates { get; set; }
Gets or sets the auto complete drop down location.
protected Point AutoCompleteDropDownLocation { get; set; }
The auto complete popup location.
Gets or sets a property name which will be used to extract a value from the data items
public string AutoCompleteValueMember { get; set; }
Gets the auto complete view element.
protected AutoCompleteBoxViewElement AutoCompleteViewElement { get; }
Allows auto-completion whenever the mode is not None; this check does not restrict multiline text.
protected override bool CanPerformAutoComplete { get; }
Overrides:
Gets or sets the delimiter used to tokenize the text
public char Delimiter { get; set; }
The delimiter.
Gets the tokenized items.
public RadTokenizedTextItemCollection Items { get; }
Gets or sets a value indicating whether the remove button of TokenizedTextBlockElement should appear. Notice that the text box should not be in read only mode
public bool ShowRemoveButton { get; set; }
true if [show remove button]; otherwise, false.
Methods
Suppresses CloseCalled when a suggestion is matched and both its text and pattern are available; other close requests use the base behavior.
public override void CloseDropDown(RadPopupCloseReason reason)
The reason the suggestion popup is closing.
Overrides:
Installs token-aware navigation and input handling, defaults suggestions to Suggest, and aligns the popup's top edge with its supplied location.
protected override void CreateChildElements()
Overrides:
Creates the list element that applies auto-complete filtering to suggestions.
protected override RadTextBoxListElement CreateListElement()
A RadAutoCompleteBoxListElement for the suggestion popup.
Overrides:
Creates the tokenized item collection.
protected virtual RadTokenizedTextItemCollection CreateTokenizedItemCollection()
Creates the view element that separates editable text from delimiter-terminated tokens.
protected override TextBoxViewElement CreateViewElement()
Overrides:
Gets the start boundary of the editable text segment used for the current suggestion.
protected override TextPosition GetFirstAutoCompletePosition()
The segment's start position, or null when the navigator has no caret position.
Overrides:
Gets the end boundary of the editable text segment used for the current suggestion.
protected override TextPosition GetLastAutoCompletePosition()
The segment's end position, or null when the navigator has no caret position.
Overrides:
Re-enables and resets the size override for items hidden by the previous pass, then disables and hides items whose text is already tokenized.
protected virtual void HideDuplicates()
Resets the cached suggestion-popup location after initializing the base text box element.
protected override void InitializeFields()
Overrides:
Applies the selected suggestion for mouse or Enter/Tab closure, appends the token delimiter, and resets the suggestion range.
protected override void OnAutoCompleteDropDownClosed(RadAutoCompleteDropDownClosedEventArgs e)
The popup close reason and input that triggered it.
Overrides:
Handles Enter and Tab by consuming the key and closing the suggestion popup with a keyboard close reason.
protected virtual void OnAutoCompleteDropDownKeyDown(KeyEventArgs e)
The key event received by the suggestion list.
Positions the suggestion popup below the caret, filters already-tokenized items when needed, and selects the first result when the popup opens without a selection. For a single result in Suggest or SuggestAppend mode, it also opens the popup at the caret.
protected override void PerformAutoCompleteOverride(EditOperation context)
The text edit operation that triggered auto-completion.
Overrides:
Events
Occurs when text is validating as token
public event TokenValidatingEventHandler TokenValidating