Show fee slider tooltip when using chart to change value
ADD
WalletWasabi.Fluent/Behaviors/ShowFeeSliderToolTipBehavior.cs
+using System;
+using System.Linq;
+using System.Reactive.Disposables;
+using System.Reactive.Linq;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Controls.Primitives;
+using Avalonia.VisualTree;
+
+namespace WalletWasabi.Fluent.Behaviors
+{
+ public class ShowFeeSliderToolTipBehavior : DisposingBehavior<Control>
+ {
+ public static readonly StyledProperty<Slider?> SliderProperty =
+ AvaloniaProperty.Register<ShowFeeSliderToolTipBehavior, Slider?>(nameof(Slider));
+
+ public Slider? Slider
+ {
+ get => GetValue(SliderProperty);
+ set => SetValue(SliderProperty, value);
+ }
+
+ protected override void OnAttached(CompositeDisposable disposables)
+ {
+ if (AssociatedObject is null)
+ {
+ return;
+ }
+
+ Observable
+ .FromEventPattern(AssociatedObject, nameof(AssociatedObject.PointerPressed))
+ .Subscribe(_ => SetSliderTooTipIsOpen(true))
+ .DisposeWith(disposables);
+
+ Observable
+ .FromEventPattern(AssociatedObject, nameof(AssociatedObject.PointerReleased))
+ .Subscribe(_ => SetSliderTooTipIsOpen(false))
+ .DisposeWith(disposables);
+
+ Observable
+ .FromEventPattern(AssociatedObject, nameof(AssociatedObject.PointerCaptureLost))
+ .Subscribe(_ => SetSliderTooTipIsOpen(false))
+ .DisposeWith(disposables);
+ }
+
+ protected override void OnDetaching()
+ {
+ SetSliderTooTipIsOpen(false);
+
+ base.OnDetaching();
+ }
+
+ private void SetSliderTooTipIsOpen(bool isOpen)
+ {
+ var thumb = Slider?.GetVisualDescendants()?.OfType<Thumb>().FirstOrDefault();
+ if (thumb is { })
+ {
+ var toolTip = ToolTip.GetTip(thumb);
+ if (toolTip is ToolTip)
+ {
+ thumb.SetValue(ToolTip.IsOpenProperty, isOpen);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/SendFeeView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/SendFeeView.axaml
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:i="clr-namespace:Avalonia.Xaml.Interactivity;assembly=Avalonia.Xaml.Interactivity"
xmlns:ir="clr-namespace:Avalonia.Xaml.Interactions.Responsive;assembly=Avalonia.Xaml.Interactions"
+ xmlns:behaviors="clr-namespace:WalletWasabi.Fluent.Behaviors"
xmlns:c="using:WalletWasabi.Fluent.Controls"
xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Wallets.Send"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
</Style>
</c:LineChart.Styles>
<i:Interaction.Behaviors>
+ <behaviors:ShowFeeSliderToolTipBehavior Slider="{Binding #CursorValue2}"/>
<ir:AdaptiveBehavior>
<ir:AdaptiveClassSetter MinWidth="0" MaxWidth="550" ClassName="narrow"/>
</ir:AdaptiveBehavior>

Show fee slider tooltip when using chart to change value