do a workaround for keygestures interfering with tagsbox....
MODIFY
WalletWasabi.Fluent/Controls/TagsBox.xaml.cs
WalletWasabi.Fluent/Controls/TagsBox.xaml.cs
@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reactive.Disposables;
+using System.Windows.Input;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
@@ -40,6 +41,11 @@ namespace WalletWasabi.Fluent.Controls
private bool _isFocused;
private bool _isInputEnabled = true;
private IEnumerable? _suggestions;
+ private ICommand _CompletedCommand;
+
+ public static readonly DirectProperty<TagsBox, ICommand> CompletedCommandProperty =
+ AvaloniaProperty.RegisterDirect<TagsBox, ICommand>(nameof(CompletedCommand), o => o.CompletedCommand,
+ (o, v) => o.CompletedCommand = v);
static TagsBox()
{
@@ -71,6 +77,12 @@ namespace WalletWasabi.Fluent.Controls
set => SetAndRaise(SuggestionsProperty, ref _suggestions, value);
}
+ public ICommand CompletedCommand
+ {
+ get { return _CompletedCommand; }
+ set { SetAndRaise(CompletedCommandProperty, ref _CompletedCommand, value); }
+ }
+
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);
@@ -111,10 +123,7 @@ namespace WalletWasabi.Fluent.Controls
if (_isFocused)
{
Dispatcher.UIThread.Post(
- () =>
- {
- _autoCompleteBox.Focus();
- });
+ () => { _autoCompleteBox.Focus(); });
}
}
@@ -299,6 +308,11 @@ namespace WalletWasabi.Fluent.Controls
{
SelectedTag = tagString;
CheckIsInputEnabled();
+
+ if (Items is IList x && x.Count >= ItemCountLimit)
+ {
+ CompletedCommand?.Execute(null);
+ }
}
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/RecoverWallet/RecoverWalletView.axaml
WalletWasabi.Fluent/Views/RecoverWallet/RecoverWalletView.axaml
x:DataType="recoverWallet:RecoverWalletViewModel"
x:CompileBindings="True"
x:Class="WalletWasabi.Fluent.Views.RecoverWallet.RecoverWalletView">
- <UserControl.KeyBindings>
- <KeyBinding Gesture="Enter" Command="{Binding NextCommand}" />
- </UserControl.KeyBindings>
<c:ContentArea x:Name="RecoveryPageRoot"
Title="Enter recovery words" Caption="Type in your 12 recovery words and click continue"
EnableBack="True"
Opacity="{Binding FinishCommandCanExecute}" />
<Label Content="_Type in your recovery words here:" Target="SeedTagsBox" DockPanel.Dock="Top" />
<c:TagsBox x:Name="SeedTagsBox"
+ CompletedCommand="{Binding NextCommand}"
DockPanel.Dock="Top"
ItemCountLimit="12"
RestrictInputToSuggestions="True"

do a workaround for keygestures interfering with tagsbox....