-
Notifications
You must be signed in to change notification settings - Fork 132
Porting TokenizingTextBox #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
5e7fd1c
Init
niels9001 c3f1cea
Fixing namespaces
niels9001 f80f185
resolving platform diferences
niels9001 4c7e25b
Fix ref
niels9001 36325e6
Working sample
niels9001 6b80aa8
Update TokenizingTextBoxCustomSample.xaml
niels9001 de0c74e
Design fixes
niels9001 c5f1572
Visual updates
niels9001 4eeaa2c
Merge branch 'main' into niels9001/TokenizingTextBox
niels9001 cafa1a3
Update tooling
niels9001 44d9bd9
More changes
niels9001 f156c4e
Updating samples and tests
niels9001 c3e2613
Adding SampleEmailType
niels9001 80f35ee
Remove unused files
niels9001 eb1adbe
Sample improvements
niels9001 605d9f0
Uno improvements
niels9001 f982bca
Remove local WrapPanel
niels9001 e0bf8a9
Merge branch 'main' into niels9001/TokenizingTextBox
niels9001 bf51fc6
Revert "Remove local WrapPanel"
niels9001 48e34dd
Fix test
niels9001 ecabf8e
Remove local WrapPanel
niels9001 d56e2cd
Remove unused code from sample
niels9001 e299336
Merge branch 'main' into niels9001/TokenizingTextBox
niels9001 a83ca38
Merge branch 'main' into niels9001/TokenizingTextBox
niels9001 7937930
Adding icons
niels9001 3245135
Update components/TokenizingTextBox/src/CommunityToolkit.WinUI.Contro…
Arlodotexe 34e8ab6
Update components/TokenizingTextBox/src/InterspersedObservableCollect…
niels9001 fdfcb90
Removed extraneous information from TokenizingTextBox sample docs
Arlodotexe f60895c
Get dispatcher queue from constructor
Arlodotexe 71608d9
Merge branch 'main' into niels9001/TokenizingTextBox
Arlodotexe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| @ECHO OFF | ||
|
|
||
| powershell ..\..\tooling\ProjectHeads\GenerateSingleSampleHeads.ps1 -componentPath %CD% %* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <!-- | ||
| WinUI 2 under UWP uses TargetFramework uap10.0.* | ||
| WinUI 3 under WinAppSdk uses TargetFramework net6.0-windows10.* | ||
| However, under Uno-powered platforms, both WinUI 2 and 3 can share the same TargetFramework. | ||
|
|
||
| MSBuild doesn't play nicely with this out of the box, so we've made it easy for you. | ||
|
|
||
| For .NET Standard packages, you can use the Nuget Package Manager in Visual Studio. | ||
| For UWP / WinAppSDK / Uno packages, place the package references here. | ||
| --> | ||
| <Project> | ||
| <!-- WinUI 2 / UWP --> | ||
| <ItemGroup Condition="'$(IsUwp)' == 'true'"> | ||
| <!-- <PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Primitives" Version="7.1.2"/> --> | ||
| </ItemGroup> | ||
|
|
||
| <!-- WinUI 2 / Uno --> | ||
| <ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '2'"> | ||
| <!-- <PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI.Controls.Primitives" Version="7.1.11"/> --> | ||
| </ItemGroup> | ||
|
|
||
| <!-- WinUI 3 / WinAppSdk --> | ||
| <ItemGroup Condition="'$(IsWinAppSdk)' == 'true'"> | ||
| <!-- <PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Primitives" Version="7.1.2"/> --> | ||
| </ItemGroup> | ||
|
|
||
| <!-- WinUI 3 / Uno --> | ||
| <ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '3'"> | ||
| <!-- <PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Primitives" Version="7.1.100-dev.15.g12261e2626"/> --> | ||
| </ItemGroup> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| // 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 TokenizingTextBoxExperiment.Samples; | ||
|
|
||
| /// <summary> | ||
| /// Sample of strongly-typed data for <see cref="CommunityToolkit.WinUI.Controls.TokenizingTextBox"/>. | ||
| /// </summary> | ||
| public class SampleDataType | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets symbol to display. | ||
| /// </summary> | ||
| public Symbol Icon { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets text to display. | ||
| /// </summary> | ||
| public string? Text { get; set; } | ||
|
|
||
| public override string ToString() | ||
| { | ||
| return Text!; | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
components/TokenizingTextBox/samples/TokenizingTextBox.Samples.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <Project Sdk="MSBuild.Sdk.Extras/3.0.23"> | ||
| <PropertyGroup> | ||
| <ToolkitComponentName>TokenizingTextBox</ToolkitComponentName> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- Sets this up as a toolkit component's sample project --> | ||
| <Import Project="$(ToolingDirectory)\ToolkitComponent.SampleProject.props" /> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| --- | ||
| title: TokenizingTextBox | ||
| author: michael-hawker | ||
| description: A text input control that auto-suggests and displays token items. | ||
| keywords: TokenizingTextBox, control, tokens | ||
| dev_langs: | ||
| - csharp | ||
| category: Controls | ||
| subcategory: Input | ||
| discussion-id: 0 | ||
| issue-id: 0 | ||
| icon: Assets/TokenizingTextBox.png | ||
| --- | ||
|
|
||
| # TokenizingTextBox | ||
|
|
||
| The [TokenizingTextBox](/dotnet/api/microsoft.toolkit.uwp.ui.controls.tokenizingtextbox) is an advanced [AutoSuggestBox](/uwp/api/Windows.UI.Xaml.Controls.AutoSuggestBox) which will display selected items as tokens within the textbox. A user can easily see the picked items or remove them easily. | ||
|
|
||
| > [!Sample TokenizingTextBoxSample] |
83 changes: 83 additions & 0 deletions
83
components/TokenizingTextBox/samples/TokenizingTextBoxSample.xaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| <!-- 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. --> | ||
| <Page x:Class="TokenizingTextBoxExperiment.Samples.TokenizingTextBoxSample" | ||
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
| xmlns:controls="using:CommunityToolkit.WinUI.Controls" | ||
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
| xmlns:local="using:TokenizingTextBoxExperiment.Samples" | ||
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
| xmlns:ui="using:CommunityToolkit.WinUI" | ||
| mc:Ignorable="d"> | ||
|
|
||
| <StackPanel Orientation="Vertical" | ||
| Spacing="4"> | ||
| <controls:TokenizingTextBox x:Name="TokenBox" | ||
| MaxWidth="620" | ||
| HorizontalAlignment="Left" | ||
| ItemClick="TokenBox_ItemClick" | ||
| ItemsSource="{x:Bind SelectedTokens, Mode=TwoWay}" | ||
| Loaded="TokenBox_Loaded" | ||
| MaximumTokens="5" | ||
| PlaceholderText="Add actions" | ||
| QueryIcon="{ui:FontIconSource Glyph=, | ||
| FontSize=12}" | ||
| SuggestedItemsSource="{x:Bind _samples, Mode=OneWay}" | ||
| TextChanged="TextChanged" | ||
| TextMemberPath="Text" | ||
| TokenDelimiter="," | ||
| TokenItemAdding="TokenItemCreating"> | ||
| <controls:TokenizingTextBox.Header> | ||
| <TextBlock> | ||
| <Run Text="Start typing and select up to" /> | ||
| <Run FontWeight="SemiBold" | ||
| Text="{Binding MaximumTokens, ElementName=TokenBox, Mode=OneWay}" /> | ||
| <Run Text="actions" /> | ||
| </TextBlock> | ||
| </controls:TokenizingTextBox.Header> | ||
| <controls:TokenizingTextBox.SuggestedItemTemplate> | ||
| <DataTemplate> | ||
| <StackPanel Orientation="Horizontal"> | ||
| <Viewbox Width="16"> | ||
| <SymbolIcon Symbol="{Binding Icon}" /> | ||
| </Viewbox> | ||
| <TextBlock Padding="8,0,0,0" | ||
| Text="{Binding Text}" /> | ||
| </StackPanel> | ||
| </DataTemplate> | ||
| </controls:TokenizingTextBox.SuggestedItemTemplate> | ||
| <controls:TokenizingTextBox.TokenItemTemplate> | ||
| <DataTemplate> | ||
| <StackPanel Orientation="Horizontal"> | ||
| <Viewbox Width="16"> | ||
| <SymbolIcon Symbol="{Binding Icon}" /> | ||
| </Viewbox> | ||
|
|
||
| <TextBlock Padding="8,0,0,0" | ||
| Text="{Binding Text}" /> | ||
| </StackPanel> | ||
| </DataTemplate> | ||
| </controls:TokenizingTextBox.TokenItemTemplate> | ||
| </controls:TokenizingTextBox> | ||
|
|
||
|
|
||
| <TextBlock Margin="0,24,0,0" | ||
| FontWeight="SemiBold" | ||
| Text="Text:" /> | ||
| <TextBlock x:Name="currentEdit" /> | ||
|
|
||
| <TextBlock Margin="0,24,0,0" | ||
| FontWeight="SemiBold" | ||
| Text="SelectedTokenText:" /> | ||
| <TextBlock x:Name="selectedItemsString" /> | ||
|
|
||
| <TextBlock Margin="0,24,0,0" | ||
| FontWeight="SemiBold" | ||
| Text="Items:" /> | ||
| <ItemsControl ItemsSource="{x:Bind SelectedTokens, Mode=OneWay}" /> | ||
|
|
||
| <TextBlock Margin="0,24,0,0" | ||
| FontWeight="SemiBold" | ||
| Text="Clicked item:" /> | ||
| <TextBlock x:Name="clickedItem" /> | ||
| </StackPanel> | ||
| </Page> |
96 changes: 96 additions & 0 deletions
96
components/TokenizingTextBox/samples/TokenizingTextBoxSample.xaml.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| // 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 CommunityToolkit.WinUI.Controls; | ||
|
|
||
| namespace TokenizingTextBoxExperiment.Samples; | ||
|
|
||
| [ToolkitSample(id: nameof(TokenizingTextBoxSample), "Basic sample", description: $"A sample for showing how to create and use a {nameof(TokenizingTextBox)}.")] | ||
| public sealed partial class TokenizingTextBoxSample : Page | ||
| { | ||
| public readonly List<SampleDataType> _samples = new List<SampleDataType>() | ||
| { | ||
| new SampleDataType() { Text = "Account", Icon = Symbol.Account }, | ||
| new SampleDataType() { Text = "Add friend", Icon = Symbol.AddFriend }, | ||
| new SampleDataType() { Text = "Attach", Icon = Symbol.Attach }, | ||
| new SampleDataType() { Text = "Attach camera", Icon = Symbol.AttachCamera }, | ||
| new SampleDataType() { Text = "Audio", Icon = Symbol.Audio }, | ||
| new SampleDataType() { Text = "Block contact", Icon = Symbol.BlockContact }, | ||
| new SampleDataType() { Text = "Calculator", Icon = Symbol.Calculator }, | ||
| new SampleDataType() { Text = "Calendar", Icon = Symbol.Calendar }, | ||
| new SampleDataType() { Text = "Camera", Icon = Symbol.Camera }, | ||
| new SampleDataType() { Text = "Contact", Icon = Symbol.Contact }, | ||
| new SampleDataType() { Text = "Favorite", Icon = Symbol.Favorite }, | ||
| new SampleDataType() { Text = "Link", Icon = Symbol.Link }, | ||
| new SampleDataType() { Text = "Mail", Icon = Symbol.Mail }, | ||
| new SampleDataType() { Text = "Map", Icon = Symbol.Map }, | ||
| new SampleDataType() { Text = "Phone", Icon = Symbol.Phone }, | ||
| new SampleDataType() { Text = "Pin", Icon = Symbol.Pin }, | ||
| new SampleDataType() { Text = "Rotate", Icon = Symbol.Rotate }, | ||
| new SampleDataType() { Text = "Rotate camera", Icon = Symbol.RotateCamera }, | ||
| new SampleDataType() { Text = "Send", Icon = Symbol.Send }, | ||
| new SampleDataType() { Text = "Tags", Icon = Symbol.Tag }, | ||
| new SampleDataType() { Text = "UnFavorite", Icon = Symbol.UnFavorite }, | ||
| new SampleDataType() { Text = "UnPin", Icon = Symbol.UnPin }, | ||
| new SampleDataType() { Text = "Zoom", Icon = Symbol.Zoom }, | ||
| new SampleDataType() { Text = "ZoomIn", Icon = Symbol.ZoomIn }, | ||
| new SampleDataType() { Text = "ZoomOut", Icon = Symbol.ZoomOut }, | ||
| }; | ||
|
|
||
| public ObservableCollection<SampleDataType> SelectedTokens { get; set; } | ||
|
|
||
| public TokenizingTextBoxSample() | ||
| { | ||
| this.InitializeComponent(); | ||
| SelectedTokens = new() | ||
| { | ||
| _samples[0], | ||
| _samples[1] | ||
| }; | ||
|
|
||
| } | ||
|
|
||
| private void TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args) | ||
| { | ||
| currentEdit.Text = TokenBox.Text; | ||
| SetSelectedTokenText(); | ||
| } | ||
|
|
||
| private void SetSelectedTokenText() | ||
| { | ||
| selectedItemsString.Text = TokenBox.SelectedTokenText; | ||
| } | ||
|
|
||
| private void TokenItemCreating(object sender, TokenItemAddingEventArgs e) | ||
| { | ||
| // Take the user's text and convert it to our data type (if we have a matching one). | ||
| #if !HAS_UNO | ||
| e.Item = _samples.FirstOrDefault((item) => item.Text!.Contains(e.TokenText, StringComparison.CurrentCultureIgnoreCase)); | ||
| #else | ||
| e.Item = _samples.FirstOrDefault((item) => item.Text!.Contains(e.TokenText)); | ||
| #endif | ||
| // Otherwise, create a new version of our data type | ||
| if (e.Item == null) | ||
| { | ||
| e.Item = new SampleDataType() | ||
| { | ||
| Text = e.TokenText, | ||
| Icon = Symbol.OutlineStar | ||
| }; | ||
| } | ||
| } | ||
|
|
||
| private void TokenBox_ItemClick(object sender, ItemClickEventArgs e) | ||
| { | ||
| if (e.ClickedItem is SampleDataType selectedItem) | ||
| { | ||
| clickedItem.Text = selectedItem.Text!; | ||
| } | ||
| } | ||
|
|
||
| private void TokenBox_Loaded(object sender, RoutedEventArgs e) | ||
| { | ||
| SetSelectedTokenText(); | ||
| } | ||
| } |
13 changes: 13 additions & 0 deletions
13
components/TokenizingTextBox/src/AdditionalAssemblyInfo.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| // 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 System.Runtime.CompilerServices; | ||
|
|
||
| // These `InternalsVisibleTo` calls are intended to make it easier for | ||
| // for any internal code to be testable in all the different test projects | ||
| // used with the Labs infrastructure. | ||
| [assembly: InternalsVisibleTo("TokenizingTextBox.Tests.Uwp")] | ||
| [assembly: InternalsVisibleTo("TokenizingTextBox.Tests.WinAppSdk")] | ||
| [assembly: InternalsVisibleTo("CommunityToolkit.Tests.Uwp")] | ||
| [assembly: InternalsVisibleTo("CommunityToolkit.Tests.WinAppSdk")] |
23 changes: 23 additions & 0 deletions
23
components/TokenizingTextBox/src/CommunityToolkit.WinUI.Controls.TokenizingTextBox.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <Project Sdk="MSBuild.Sdk.Extras/3.0.23"> | ||
| <PropertyGroup> | ||
| <ToolkitComponentName>TokenizingTextBox</ToolkitComponentName> | ||
| <Description>This package contains TokenizingTextBox.</Description> | ||
| <Version>0.0.1</Version> | ||
|
|
||
| <!-- Rns suffix is required for namespaces shared across projects. See https://github.com/CommunityToolkit/Labs-Windows/issues/152 --> | ||
| <RootNamespace>CommunityToolkit.WinUI.Controls.TokenizingTextBoxRns</RootNamespace> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="$(ToolkitExtensionSourceProject)" /> | ||
| <ProjectReference Include="$(ToolkitHelperSourceProject)" /> | ||
| <ProjectReference Include="$(ToolkitPrimitiveSourceProject)" /> | ||
| </ItemGroup> | ||
|
|
||
| <!-- Sets this up as a toolkit component's source project --> | ||
| <Import Project="$(ToolingDirectory)\ToolkitComponent.SourceProject.props" /> | ||
Arlodotexe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| <PropertyGroup> | ||
| <PackageId>$(PackageIdPrefix).$(PackageIdVariant).Controls.$(ToolkitComponentName)</PackageId> | ||
| </PropertyGroup> | ||
| </Project> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| <!-- | ||
| WinUI 2 under UWP uses TargetFramework uap10.0.* | ||
| WinUI 3 under WinAppSdk uses TargetFramework net6.0-windows10.* | ||
| However, under Uno-powered platforms, both WinUI 2 and 3 can share the same TargetFramework. | ||
|
|
||
| MSBuild doesn't play nicely with this out of the box, so we've made it easy for you. | ||
|
|
||
| For .NET Standard packages, you can use the Nuget Package Manager in Visual Studio. | ||
| For UWP / WinAppSDK / Uno packages, place the package references here. | ||
| --> | ||
| <Project> | ||
| <!-- WinUI 2 / UWP --> | ||
| <ItemGroup Condition="'$(IsUwp)' == 'true'"> | ||
| <!-- <PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls.Primitives" Version="7.1.2"/> --> | ||
| </ItemGroup> | ||
|
|
||
| <!-- WinUI 2 / Uno --> | ||
| <ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '2'"> | ||
| <!-- <PackageReference Include="Uno.Microsoft.Toolkit.Uwp.UI.Controls.Primitives" Version="7.1.11"/> --> | ||
| </ItemGroup> | ||
|
|
||
| <!-- WinUI 3 / WinAppSdk --> | ||
| <ItemGroup Condition="'$(IsWinAppSdk)' == 'true'"> | ||
| <!-- <PackageReference Include="CommunityToolkit.WinUI.UI.Controls.Primitives" Version="7.1.2"/> --> | ||
| </ItemGroup> | ||
|
|
||
| <!-- WinUI 3 / Uno --> | ||
| <ItemGroup Condition="'$(IsUno)' == 'true' AND '$(WinUIMajorVersion)' == '3'"> | ||
| <!-- <PackageReference Include="Uno.CommunityToolkit.WinUI.UI.Controls.Primitives" Version="7.1.100-dev.15.g12261e2626"/> --> | ||
| </ItemGroup> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| // 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> | ||
| /// Provides access to unresolved token string values within the tokenizing text box control | ||
| /// </summary> | ||
| public interface ITokenStringContainer | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets the string text for this unresolved token | ||
| /// </summary> | ||
| string Text { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets a value indicating whether this is the last text based token in the collection as it will always remain at the end. | ||
| /// </summary> | ||
| bool IsLast { get; } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.