Remove AutoBringIntoViewExtension
MODIFY
WalletWasabi.Fluent/App.axaml.cs
WalletWasabi.Fluent/App.axaml.cs
@@ -6,7 +6,6 @@ using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Data;
using Avalonia.Markup.Xaml;
using ReactiveUI;
-using WalletWasabi.Fluent.Behaviors;
using WalletWasabi.Fluent.Providers;
using WalletWasabi.Fluent.ViewModels;
using WalletWasabi.Fluent.Views;
@@ -56,8 +55,6 @@ public class App : Application
public override void OnFrameworkInitializationCompleted()
{
- AutoBringIntoViewExtension.Initialise();
-
if (!Design.IsDesignMode)
{
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)

DELETE
WalletWasabi.Fluent/Behaviors/AutoBringIntoViewExtension.cs
-using Avalonia.Controls;
-using Avalonia.Input;
-using ReactiveUI;
-using System.Reactive.Linq;
-using Avalonia.VisualTree;
-
-namespace WalletWasabi.Fluent.Behaviors;
-
-public static class AutoBringIntoViewExtension
-{
- private static bool Initialised { get; set; }
-
- public static void Initialise()
- {
- if (!Initialised)
- {
- Initialised = true;
-
- if (KeyboardDevice.Instance is { } device)
- {
- device.WhenAnyValue(x => x.FocusedElement)
- .Where(x => x is IControl)
- .Select(x => x as IControl)
- .Subscribe(
- x =>
- {
- static void BringParentToView(IVisual ie)
- {
- if (ie.VisualParent is IInputElement { IsKeyboardFocusWithin: true } parent)
- {
- BringParentToView(parent);
- }
-
- if (ie is IControl ic)
- {
- ic.BringIntoView();
- }
- }
-
- if (x is IInputElement ie)
- {
- BringParentToView(ie);
- }
- });
- }
- }
- }
-}
-

Remove AutoBringIntoViewExtension