add a new improved focus behavior.
ADD
WalletWasabi.Fluent/Behaviors/AttachedToVisualTreeBehavior.cs
+using Avalonia;
+using Avalonia.VisualTree;
+using Avalonia.Xaml.Interactivity;
+
+namespace WalletWasabi.Fluent.Behaviors
+{
+ public abstract class AttachedToVisualTreeBehavior<T> : Behavior<T> where T : Visual
+ {
+ protected override void OnAttached()
+ {
+ base.OnAttached();
+
+ AssociatedObject.AttachedToVisualTree += AssociatedObjectOnAttachedToVisualTree;
+ }
+
+ private void AssociatedObjectOnAttachedToVisualTree(object? sender, VisualTreeAttachmentEventArgs e)
+ {
+ OnAttachedToVisualTree();
+ }
+
+ protected abstract void OnAttachedToVisualTree();
+
+ protected override void OnDetaching()
+ {
+ base.OnDetaching();
+
+ AssociatedObject.AttachedToVisualTree -= AssociatedObjectOnAttachedToVisualTree;
+ }
+ }
+}
\ No newline at end of file

ADD
WalletWasabi.Fluent/Behaviors/FocusOnAttachedBehavior.cs
+using Avalonia.Controls;
+
+namespace WalletWasabi.Fluent.Behaviors
+{
+ public class FocusOnAttachedBehavior : AttachedToVisualTreeBehavior<Control>
+ {
+ protected override void OnAttachedToVisualTree()
+ {
+ AssociatedObject.Focus();
+ }
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/AddWalletPageView.axaml
WalletWasabi.Fluent/Views/AddWalletPageView.axaml
xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls"
xmlns:conv="clr-namespace:WalletWasabi.Fluent.Converters"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
- xmlns:behaviors="clr-namespace:WalletWasabi.Gui.Behaviors;assembly=WalletWasabi.Gui"
+ xmlns:behaviors="clr-namespace:WalletWasabi.Fluent.Behaviors"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="vm:HomePageViewModel"
x:Class="WalletWasabi.Fluent.Views.AddWalletPageView">

add a new improved focus behavior.