fix some rider issues.
MODIFY
WalletWasabi.Fluent/Behaviors/AttachedToVisualTreeBehavior.cs
WalletWasabi.Fluent/Behaviors/AttachedToVisualTreeBehavior.cs
using Avalonia;
-using Avalonia.VisualTree;
using Avalonia.Xaml.Interactivity;
namespace WalletWasabi.Fluent.Behaviors
@@ -10,7 +9,7 @@ namespace WalletWasabi.Fluent.Behaviors
{
base.OnAttached();
- AssociatedObject.AttachedToVisualTree += AssociatedObjectOnAttachedToVisualTree;
+ AssociatedObject!.AttachedToVisualTree += AssociatedObjectOnAttachedToVisualTree;
}
private void AssociatedObjectOnAttachedToVisualTree(object? sender, VisualTreeAttachmentEventArgs e)
@@ -24,7 +23,7 @@ namespace WalletWasabi.Fluent.Behaviors
{
base.OnDetaching();
- AssociatedObject.AttachedToVisualTree -= AssociatedObjectOnAttachedToVisualTree;
+ AssociatedObject!.AttachedToVisualTree -= AssociatedObjectOnAttachedToVisualTree;
}
}
}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Behaviors/AutoBringIntoViewExtension.cs
WalletWasabi.Fluent/Behaviors/AutoBringIntoViewExtension.cs
@@ -18,7 +18,8 @@ namespace WalletWasabi.Fluent.Behaviors
KeyboardDevice.Instance.WhenAnyValue(x => x.FocusedElement)
.OfType<IControl>()
- .Subscribe(x =>
+ .Subscribe(
+ x =>
{
static void BringParentToView(IInputElement ie)
{

MODIFY
WalletWasabi.Fluent/Behaviors/FocusNextItemBehavior.cs
WalletWasabi.Fluent/Behaviors/FocusNextItemBehavior.cs
@@ -4,7 +4,6 @@ using Avalonia.LogicalTree;
using Avalonia.VisualTree;
using ReactiveUI;
using System;
-using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
@@ -25,7 +24,8 @@ namespace WalletWasabi.Fluent.Behaviors
{
this.WhenAnyValue(x => x.IsFocused)
.Where(x => x == false)
- .Subscribe(_ =>
+ .Subscribe(
+ _ =>
{
var parentControl = AssociatedObject.FindAncestorOfType<ItemsControl>();

MODIFY
WalletWasabi.Fluent/Behaviors/FocusOnAttachedBehavior.cs
WalletWasabi.Fluent/Behaviors/FocusOnAttachedBehavior.cs
@@ -6,7 +6,7 @@ namespace WalletWasabi.Fluent.Behaviors
{
protected override void OnAttachedToVisualTree()
{
- AssociatedObject.Focus();
+ AssociatedObject?.Focus();
}
}
}
\ No newline at end of file

fix some rider issues.