implement paste function, and disable cut/copy
MODIFY
WalletWasabi.Fluent/Controls/TagsBox.xaml
WalletWasabi.Fluent/Controls/TagsBox.xaml
<Style Selector="c|TagsBox AutoCompleteBox /template/ TextBox">
<Setter Property="IsReadOnly" Value="{Binding !IsInputEnabled}" />
+ <Setter Property="ContextMenu">
+ <ContextMenu>
+ <MenuItem Header="Paste" Command="{Binding $parent[TextBox].Paste}" IsEnabled="{Binding $parent[TextBox].CanPaste}" InputGesture="{x:Static TextBox.PasteGesture}"/>
+ </ContextMenu>
+ </Setter>
</Style>
</Styles>
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Controls/TagsBox.xaml.cs
WalletWasabi.Fluent/Controls/TagsBox.xaml.cs
@@ -230,7 +230,9 @@ namespace WalletWasabi.Fluent.Controls
var endsWithSpace = currentText.EndsWith(' ');
currentText = currentText.Trim();
- if (RestrictInputToSuggestions && Suggestions is IList<string> suggestions)
+ var splitTags = currentText.Split(' ');
+ var suggestions = Suggestions as IList<string>;
+ if (splitTags.Length == 1 && suggestions != null && RestrictInputToSuggestions)
{
var keywordIsInSuggestions =
suggestions.Any(
@@ -241,6 +243,29 @@ namespace WalletWasabi.Fluent.Controls
return;
}
}
+ else if (suggestions != null)
+ {
+ foreach (var tag in splitTags)
+ {
+ if (!RestrictInputToSuggestions)
+ {
+ SelectTag(tag);
+ continue;
+ }
+
+ var keywordIsInSuggestions =
+ suggestions.Any(
+ x => x.Equals(tag, StringComparison.InvariantCultureIgnoreCase));
+
+ if (keywordIsInSuggestions)
+ {
+ SelectTag(tag);
+ }
+ }
+
+ Dispatcher.UIThread.Post(() => { autoCompleteBox.ClearValue(AutoCompleteBox.TextProperty); });
+ return;
+ }
if (!_isInputEnabled ||
currentText.Length < 1 ||

implement paste function, and disable cut/copy