TokenizingTextBox.AddTokenItem(Object, Boolean) Method

Definition

Adds the specified data item as a new token to the collection, will raise the TokenItemAdding event asynchronously still for confirmation.

public void AddTokenItem (object data, bool atEnd = false);
member this.AddTokenItem : obj * bool -> unit
Public Sub AddTokenItem (data As Object, Optional atEnd As Boolean = false)

Parameters

data
Object

Item to add as a token.

atEnd
Boolean

Flag to indicate if the item should be inserted in the last used textbox (inserted) or placed at end of the token list.

Remarks

The TokenizingTextBox will automatically handle adding items for you, or you can add items to your backing Windows.UI.Xaml.Controls.ItemsControl.ItemsSource collection. This method is provide for other cases where you may need to drive inserting a new token item to where the user is currently inserting text between tokens.

Applies to