-
Notifications
You must be signed in to change notification settings - Fork 80
/
TokenizingTextBox.Events.cs
46 lines (38 loc) · 1.83 KB
/
TokenizingTextBox.Events.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace CommunityToolkit.WinUI.Controls;
/// <summary>
/// A text input control that auto-suggests and displays token items.
/// </summary>
public partial class TokenizingTextBox : ListViewBase
{
/// <summary>
/// Event raised when the text input value has changed.
/// </summary>
public event TypedEventHandler<AutoSuggestBox, AutoSuggestBoxTextChangedEventArgs> TextChanged;
/// <summary>
/// Event raised when a suggested item is chosen by the user.
/// </summary>
public event TypedEventHandler<AutoSuggestBox, AutoSuggestBoxSuggestionChosenEventArgs> SuggestionChosen;
/// <summary>
/// Event raised when the user submits the text query.
/// </summary>
public event TypedEventHandler<AutoSuggestBox, AutoSuggestBoxQuerySubmittedEventArgs> QuerySubmitted;
/// <summary>
/// Event raised before a new token item is created from a string, can be used to transform data type from text user entered.
/// </summary>
public event TypedEventHandler<TokenizingTextBox, TokenItemAddingEventArgs> TokenItemAdding;
/// <summary>
/// Event raised when a new token item has been added.
/// </summary>
public event TypedEventHandler<TokenizingTextBox, object> TokenItemAdded;
/// <summary>
/// Event raised when a token item is about to be removed. Can be canceled to prevent removal of a token.
/// </summary>
public event TypedEventHandler<TokenizingTextBox, TokenItemRemovingEventArgs> TokenItemRemoving;
/// <summary>
/// Event raised after a token has been removed.
/// </summary>
public event TypedEventHandler<TokenizingTextBox, object> TokenItemRemoved;
}