Represents a collection of RadTokenizedTextItem
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadTokenizedTextItemCollection : ReadOnlyCollection<RadTokenizedTextItem>, IList, ICollection, IEnumerable, INotifyCollectionChanged
Inheritance: objectReadOnlyCollection<RadTokenizedTextItem>RadTokenizedTextItemCollection
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadTokenizedTextItemCollection class.
protected RadTokenizedTextItemCollection(RadAutoCompleteBoxElement textBox, IList<RadTokenizedTextItem> list)
The text box.
listIList<RadTokenizedTextItem>The list.
Initializes a new instance of the RadTokenizedTextItemCollection class.
public RadTokenizedTextItemCollection(RadAutoCompleteBoxElement textBox)
The text box.
Properties
Gets the auto-complete element that supplies the view blocks and suggestion list for this collection.
protected RadAutoCompleteBoxElement TextBox { get; }
Methods
Subscribes to the token content's text-changing notification and to item property changes; the latter lets the collection refresh the item's value when its text changes.
protected virtual void Attach(ITextBlock textBlock)
The text block to observe.
Removes the token item's property-change subscription. The current implementation adds another content text-change handler instead of removing that handler.
protected virtual void Detach(ITextBlock textBlock)
The text block to detach.
Returns token items whose text compares equal to the specified text.
protected IEnumerable<RadTokenizedTextItem> FinAll(string text)
The text.
Returns:IEnumerable<RadTokenizedTextItem>
The token items whose text compares equal to text, or an empty sequence when none match.
Finds the specified text in the collection
Invokes Detach(ITextBlock) for each view block and clears the collection's token items.
protected virtual void OnClearBlocks()
Raises the event.
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
The NotifyCollectionChangedEventArgs instance containing the event data.
Provides a virtual callback for the content element's text-changing notification. The default implementation does nothing.
protected virtual void OnContentElementTextChanging(TextChangingEventArgs e)
The TextChangingEventArgs instance containing the event data.
Adds the token represented by the specified block, resolves its value from the suggestion list, and subscribes to its notifications.
protected virtual RadTokenizedTextItem OnInsertBlock(ITextBlock textBlock)
The block inserted into the view.
Returns:The added token item, or null when the block is not a token block.
Refreshes each token's value from the suggestion-list item whose text matches the token.
protected virtual void OnListElementDataBindingComplete(ListBindingCompleteEventArgs e)
The notification that triggers the value refresh.
Updates token values when suggestion-list items are reset, removed, or added.
protected virtual void OnListElementItemsChanging(NotifyCollectionChangingEventArgs e)
The NotifyCollectionChangingEventArgs instance containing the event data.
Removes the token item represented by the specified block, invokes Detach(ITextBlock), and returns the removed item.
protected virtual RadTokenizedTextItem OnRemoveBlock(ITextBlock textBlock)
The block being removed from the view.
Returns:The removed token item, or null when the block is not a token block.
Synchronizes token items with view-block changes and raises CollectionChanged when the token collection changes.
protected virtual void OnViewElementChildrenChanged(ChildrenChangedEventArgs e)
The ChildrenChangedEventArgs instance containing the event data.
Events
Occurs when the collection is changed.
public event NotifyCollectionChangedEventHandler CollectionChanged
Implements: