Make SearchBar swallow Enter key
ADD
WalletWasabi.Fluent/Behaviors/SwallowEnterKeyBehavior.cs
+using System.Reactive.Disposables;
+using System.Reactive.Linq;
+using Avalonia.Input;
+
+namespace WalletWasabi.Fluent.Behaviors;
+
+internal class SwallowEnterKeyBehavior : AttachedToVisualTreeBehavior<InputElement>
+{
+ protected override void OnAttachedToVisualTree(CompositeDisposable disposable)
+ {
+ if (AssociatedObject is null)
+ {
+ return;
+ }
+
+ Observable
+ .FromEventPattern<KeyEventArgs>(AssociatedObject, nameof(InputElement.KeyDown))
+ .Subscribe(r => r.EventArgs.Handled = true)
+ .DisposeWith(disposable);
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/SearchBar/SearchBar.axaml
WalletWasabi.Fluent/Views/SearchBar/SearchBar.axaml
<i:Interaction.Behaviors>
<behaviors:TextBoxAutoSelectTextBehavior />
+ <behaviors:SwallowEnterKeyBehavior />
</i:Interaction.Behaviors>
<TextBox.InnerLeftContent>

Make SearchBar swallow Enter key