diff --git a/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj b/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj
index af11622838f..adbb2251c0b 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj
+++ b/Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj
@@ -537,6 +537,7 @@
StaggeredLayoutPage.xaml
+
TokenizingTextBoxPage.xaml
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/SampleDataType.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/SampleDataType.cs
index 79448dbd406..971cd08181e 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/SampleDataType.cs
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/SampleDataType.cs
@@ -23,7 +23,7 @@ public class SampleDataType
public override string ToString()
{
- return "Sample Data: " + Text;
+ return Text;
}
}
-}
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/SampleEmailDataType.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/SampleEmailDataType.cs
new file mode 100644
index 00000000000..0822836189d
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/SampleEmailDataType.cs
@@ -0,0 +1,57 @@
+// 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.
+
+using Microsoft.Toolkit.Uwp.UI.Controls;
+using Windows.UI.Xaml.Controls;
+
+namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
+{
+ ///
+ /// Sample of strongly-typed email address simulated data for .
+ ///
+ public class SampleEmailDataType
+ {
+ ///
+ /// Gets or sets symbol to display.
+ ///
+ public Symbol Icon { get; set; }
+
+ ///
+ /// Gets or sets the first name .
+ ///
+ public string FirstName { get; set; }
+
+ ///
+ /// Gets or sets the family name .
+ ///
+ public string FamilyName { get; set; }
+
+ ///
+ /// Gets the display text.
+ ///
+ public string DisplayName
+ {
+ get
+ {
+ return string.Format("{0} {1}", FirstName, FamilyName);
+ }
+ }
+
+ ///
+ /// Gets the formatted email address
+ ///
+ public string EmailAddress
+ {
+ get
+ {
+ return string.Format("{0} <{1}.{2}@contoso.com>", DisplayName, FirstName, FamilyName);
+ }
+ }
+
+ public override string ToString()
+ {
+ return EmailAddress;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxCode.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxCode.bind
index 355663ad50b..107122cb618 100644
--- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxCode.bind
+++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxCode.bind
@@ -1,25 +1,118 @@
+private async void EmailTokenItemClick(object sender, ItemClickEventArgs e)
+{
+ MessageDialog md = new MessageDialog($"email address {(e.ClickedItem as SampleEmailDataType)?.EmailAddress} clicked", "Clicked Item");
+ await md.ShowAsync();
+}
+
private void TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
{
if (args.CheckCurrent() && args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
{
- if (string.IsNullOrWhiteSpace(sender.Text))
- {
- _ttb.SuggestedItemsSource = Array.Empty