New to Telerik UI for WinForms? Start a free 30-day trial

Represents a collection of RadTokenizedTextItem

Definition

Constructors

Initializes a new instance of the RadTokenizedTextItemCollection class.

C#
protected RadTokenizedTextItemCollection(RadAutoCompleteBoxElement textBox, IList<RadTokenizedTextItem> list)
Parameters:textBoxRadAutoCompleteBoxElement

The text box.

listIList<RadTokenizedTextItem>

The list.

Initializes a new instance of the RadTokenizedTextItemCollection class.

C#
public RadTokenizedTextItemCollection(RadAutoCompleteBoxElement textBox)
Parameters:textBoxRadAutoCompleteBoxElement

The text box.

Properties

Gets the auto-complete element that supplies the view blocks and suggestion list for this collection.

C#
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.

C#
protected virtual void Attach(ITextBlock textBlock)
Parameters:textBlockITextBlock

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.

C#
protected virtual void Detach(ITextBlock textBlock)
Parameters:textBlockITextBlock

The text block to detach.

Returns token items whose text compares equal to the specified text.

C#
protected IEnumerable<RadTokenizedTextItem> FinAll(string text)
Parameters:textstring

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

C#
protected RadTokenizedTextItem Find(string text)
Parameters:textstring

The text.

Returns:

RadTokenizedTextItem

Invokes Detach(ITextBlock) for each view block and clears the collection's token items.

C#
protected virtual void OnClearBlocks()

Raises the event.

C#
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Parameters:eNotifyCollectionChangedEventArgs

The NotifyCollectionChangedEventArgs instance containing the event data.

Provides a virtual callback for the content element's text-changing notification. The default implementation does nothing.

C#
protected virtual void OnContentElementTextChanging(TextChangingEventArgs e)
Parameters:eTextChangingEventArgs

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.

C#
protected virtual RadTokenizedTextItem OnInsertBlock(ITextBlock textBlock)
Parameters:textBlockITextBlock

The block inserted into the view.

Returns:

RadTokenizedTextItem

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.

C#
protected virtual void OnListElementDataBindingComplete(ListBindingCompleteEventArgs e)
Parameters:eListBindingCompleteEventArgs

The notification that triggers the value refresh.

Updates token values when suggestion-list items are reset, removed, or added.

C#
protected virtual void OnListElementItemsChanging(NotifyCollectionChangingEventArgs e)
Parameters:eNotifyCollectionChangingEventArgs

The NotifyCollectionChangingEventArgs instance containing the event data.

Removes the token item represented by the specified block, invokes Detach(ITextBlock), and returns the removed item.

C#
protected virtual RadTokenizedTextItem OnRemoveBlock(ITextBlock textBlock)
Parameters:textBlockITextBlock

The block being removed from the view.

Returns:

RadTokenizedTextItem

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.

C#
protected virtual void OnViewElementChildrenChanged(ChildrenChangedEventArgs e)
Parameters:eChildrenChangedEventArgs

The ChildrenChangedEventArgs instance containing the event data.

Events

Occurs when the collection is changed.

C#
public event NotifyCollectionChangedEventHandler CollectionChanged

Implements: INotifyCollectionChanged.CollectionChanged