diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxPage.xaml.cs b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxPage.xaml.cs index 9e8909f66..990c4bcbe 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxPage.xaml.cs +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxPage.xaml.cs @@ -90,7 +90,9 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages private AdvancedCollectionView _acv; private AdvancedCollectionView _acvEmail; - private ObservableCollection _selectedEmails; + public ObservableCollection SelectedTokens { get; set; } + + public ObservableCollection SelectedEmails { get; set; } public TokenizingTextBoxPage() { @@ -112,7 +114,10 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages public void OnXamlRendered(FrameworkElement control) { - _selectedEmails = new ObservableCollection(); + SelectedTokens = new(); + SelectedEmails = new(); + + control.DataContext = this; if (_ttb != null) { @@ -150,7 +155,6 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages { _ttbEmail = ttbEmail; - _ttbEmail.ItemsSource = _selectedEmails; _ttbEmail.ItemClick += EmailTokenItemClick; _ttbEmail.TokenItemAdding += EmailTokenItemAdding; _ttbEmail.TokenItemAdded += EmailTokenItemAdded; diff --git a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxXaml.bind b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxXaml.bind index fca7b60e1..5be567b09 100644 --- a/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxXaml.bind +++ b/Microsoft.Toolkit.Uwp.SampleApp/SamplePages/TokenizingTextBox/TokenizingTextBoxXaml.bind @@ -37,6 +37,7 @@ Current Edit: - + @@ -73,6 +74,7 @@ Margin="0,0,0,4"/>