Edit

Share via


TokenizingTextBox Class

Definition

A text input control that auto-suggests and displays token items.

[Microsoft.UI.Xaml.TemplatePart(Name="Normal", Type=typeof(Microsoft.UI.Xaml.VisualState))]
[Microsoft.UI.Xaml.TemplatePart(Name="PointerOver", Type=typeof(Microsoft.UI.Xaml.VisualState))]
[Microsoft.UI.Xaml.TemplatePart(Name="Focused", Type=typeof(Microsoft.UI.Xaml.VisualState))]
[Microsoft.UI.Xaml.TemplatePart(Name="Unfocused", Type=typeof(Microsoft.UI.Xaml.VisualState))]
public class TokenizingTextBox : Microsoft.UI.Xaml.Controls.ListViewBase
[<Microsoft.UI.Xaml.TemplatePart(Name="Normal", Type=typeof(Microsoft.UI.Xaml.VisualState))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="PointerOver", Type=typeof(Microsoft.UI.Xaml.VisualState))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="Focused", Type=typeof(Microsoft.UI.Xaml.VisualState))>]
[<Microsoft.UI.Xaml.TemplatePart(Name="Unfocused", Type=typeof(Microsoft.UI.Xaml.VisualState))>]
type TokenizingTextBox = class
    inherit ListViewBase
Public Class TokenizingTextBox
Inherits ListViewBase
Inheritance
Microsoft.UI.Xaml.Controls.ListViewBase
TokenizingTextBox
Attributes
Microsoft.UI.Xaml.TemplatePartAttribute

Constructors

TokenizingTextBox()

Initializes a new instance of the TokenizingTextBox class.

Fields

AutoSuggestBoxStyleProperty

Identifies the AutoSuggestBoxStyle property.

AutoSuggestBoxTextBoxStyleProperty

Identifies the AutoSuggestBoxTextBoxStyle property.

PlaceholderTextProperty

Identifies the PlaceholderText property.

QueryIconProperty

Identifies the QueryIcon property.

SuggestedItemContainerStyleProperty

Identifies the SuggestedItemContainerStyle property.

SuggestedItemsSourceProperty

Identifies the SuggestedItemsSource property.

SuggestedItemTemplateProperty

Identifies the SuggestedItemTemplate property.

SuggestedItemTemplateSelectorProperty

Identifies the SuggestedItemTemplateSelector property.

TabNavigateBackOnArrowProperty

Identifies the TabNavigateBackOnArrow property.

TextMemberPathProperty

Identifies the TextMemberPath property.

TextProperty

Identifies the Text property.

TokenDelimiterProperty

Identifies the TokenDelimiter property.

TokenItemTemplateProperty

Identifies the TokenItemTemplate property.

TokenItemTemplateSelectorProperty

Identifies the TokenItemTemplateSelector property.

TokenSpacingProperty

Identifies the TokenSpacing property.

Properties

AutoSuggestBoxStyle

Gets or sets the Style for the contained AutoSuggestBox template part.

AutoSuggestBoxTextBoxStyle

Gets or sets the Style for the TextBox part of the AutoSuggestBox template part.

PlaceholderText

Gets or sets the PlaceholderText for the AutoSuggestBox template part.

QueryIcon

Gets or sets the icon to display in the AutoSuggestBox template part.

SelectedTokenText

Gets the complete text value of any selection in the control. The result is the same text as would be copied to the clipboard.

SuggestedItemContainerStyle

Gets or sets the item container style for displaying suggested tokens.

SuggestedItemsSource

Gets or sets the items source for token suggestions.

SuggestedItemTemplate

Gets or sets the template for displaying suggested tokens.

SuggestedItemTemplateSelector

Gets or sets the template selector for displaying suggested tokens.

TabNavigateBackOnArrow

Gets or sets a value indicating whether the control will move focus to the previous control when an arrow key is pressed and selection is at one of the limits in the control.

Text

Gets or sets the input text of the currently active text edit.

TextMemberPath

Gets or sets the TextMemberPath of the AutoSuggestBox template part.

TokenDelimiter

Gets or sets delimiter used to determine when to process text input as a new token item.

TokenItemTemplate

Gets or sets the template for token items.

TokenItemTemplateSelector

Gets or sets the template selector for token items.

TokenSpacing

Gets or sets the spacing value used to separate token items.

Methods

AddTokenItem(Object, Boolean)

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

ClearAsync()

Clears the whole collection, will raise the TokenItemRemoving event asynchronously for each item.

GetContainerForItemOverride() Microsoft.UI.Xaml.Controls.ListViewBase.GetContainerForItemOverride
IsItemItsOwnContainerOverride(Object) Microsoft.UI.Xaml.Controls.ListViewBase.IsItemItsOwnContainerOverride(System.Object)
OnApplyTemplate() Microsoft.UI.Xaml.Controls.ListViewBase.OnApplyTemplate
PrepareContainerForItemOverride(DependencyObject, Object) Microsoft.UI.Xaml.Controls.ListViewBase.PrepareContainerForItemOverride(Microsoft.UI.Xaml.DependencyObject,System.Object)
UpdateCurrentTextEdit(ITokenStringContainer)

Helper to change out the currently focused text element in the control.

Events

QuerySubmitted

Event raised when the user submits the text query.

SuggestionChosen

Event raised when a suggested item is chosen by the user.

TextChanged

Event raised when the text input value has changed.

TokenItemAdded

Event raised when a new token item has been added.

TokenItemAdding

Event raised before a new token item is created from a string, can be used to transform data type from text user entered.

TokenItemRemoved

Event raised after a token has been removed.

TokenItemRemoving

Event raised when a token item is about to be removed. Can be canceled to prevent removal of a token.

Applies to