working focus jump behavior
ADD
WalletWasabi.Fluent/Behaviors/FocusBehavior.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Data;
+using Avalonia.Xaml.Interactivity;
+using System;
+using System.Reactive.Disposables;
+
+namespace WalletWasabi.Fluent.Behaviors
+{
+ public class FocusBehavior : Behavior<Control>
+ {
+ public static readonly StyledProperty<bool> IsFocusedProperty =
+ StyledProperty<bool>.Register<FocusBehavior, bool>(nameof(IsFocused), defaultBindingMode: BindingMode.TwoWay);
+
+ private CompositeDisposable Disposables { get; } = new CompositeDisposable();
+
+ public bool IsFocused
+ {
+ get => GetValue(IsFocusedProperty);
+ set => SetValue(IsFocusedProperty, value);
+ }
+
+ protected override void OnAttached()
+ {
+ base.OnAttached();
+
+ AssociatedObject.AttachedToLogicalTree += (sender, e) =>
+ Disposables.Add(this.GetObservable(IsFocusedProperty)
+ .Subscribe(focused =>
+ {
+ if (focused)
+ {
+ AssociatedObject.Focus();
+ }
+ }));
+ }
+
+ protected override void OnDetaching()
+ {
+ base.OnDetaching();
+
+ Disposables?.Dispose();
+ }
+ }
+}

MODIFY
WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
@@ -8,6 +8,7 @@ using WalletWasabi.Models;
using Avalonia;
using Avalonia.Markup.Xaml.Styling;
using WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet;
+using WalletWasabi.Blockchain.Keys;
namespace WalletWasabi.Fluent.ViewModels
{
@@ -20,7 +21,15 @@ namespace WalletWasabi.Fluent.ViewModels
Title = "Settings";
NextCommand = ReactiveCommand.Create(() => screen.Router.Navigate.Execute(new HomePageViewModel(screen)));
- CreateWalletCommand = ReactiveCommand.Create(() => screen.Router.Navigate.Execute(new RecoveryWordsViewModel(screen)));
+ CreateWalletCommand = ReactiveCommand.Create(() =>
+ {
+ //var walletGenerator = new WalletGenerator(Global.WalletManager.WalletDirectories.WalletsDir, Global.Network);
+ //walletGenerator.TipHeight = Global.BitcoinStore.SmartHeaderChain.TipHeight;
+ //var (km, mnemonic) = walletGenerator.GenerateWallet(WalletName, Password);
+ //new GenerateWalletSuccessViewModel(Owner, km, mnemonic);
+
+ screen.Router.Navigate.Execute(new RecoveryWordsViewModel(screen));
+ });
OpenDialogCommand = ReactiveCommand.Create(async () =>
{

MODIFY
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/ConfirmRecoveryWordsView.axaml
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/ConfirmRecoveryWordsView.axaml
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
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;assembly=WalletWasabi.Fluent"
mc:Ignorable="d"
d:DesignWidth="600" d:DesignHeight="500"
Width="600" Height="500"

working focus jump behavior