dynamically calculate row count instead of being fixed
ADD
WalletWasabi.Fluent/Behaviors/PlaceholderRowsCalculatorBehavior.cs
+using System.Collections.Generic;
+using System.Linq;
+using System.Reactive.Disposables;
+using System.Reactive.Linq;
+using ReactiveUI;
+
+namespace WalletWasabi.Fluent.Behaviors;
+
+public class PlaceholderRowsCalculatorBehavior : DisposingBehavior<DataBox.DataBox>
+{
+ protected override void OnAttached(CompositeDisposable disposables)
+ {
+ if (AssociatedObject is null)
+ {
+ return;
+ }
+
+ AssociatedObject.WhenAnyValue(x => x.Bounds)
+ .Select(x => x.Height)
+ .Where(x => x > 0)
+ .Subscribe(CalculateRows)
+ .DisposeWith(disposables);
+ }
+
+ private void CalculateRows(double Height)
+ {
+ var totalRows = (int) Math.Floor(Math.Max(3, (Height / 42) ));
+ var opacityList = new List<double>();
+ var deltaOpacity = 1d / totalRows;
+
+ foreach (var mult in Enumerable.Range(1, totalRows).Reverse())
+ {
+ opacityList.Add(mult * deltaOpacity);
+ }
+
+ AssociatedObject.Items = opacityList;
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
Focusable="False"
IsHitTestVisible="False"
DockPanel.Dock="Bottom">
- <DataBox.Items>
- <generic:List x:TypeArguments="sys:Double">
- <sys:Double>1</sys:Double>
- <sys:Double>0.875</sys:Double>
- <sys:Double>0.75</sys:Double>
- <sys:Double>0.625</sys:Double>
- <sys:Double>0.5</sys:Double>
- <sys:Double>0.375</sys:Double>
- <sys:Double>0.25</sys:Double>
- <sys:Double>0.125</sys:Double>
- </generic:List>
- </DataBox.Items>
+ <i:Interaction.Behaviors>
+ <behaviors:PlaceholderRowsCalculatorBehavior />
+ </i:Interaction.Behaviors>
<DataBox.Styles>
<Style Selector="DataBoxRow">
<Setter Property="Focusable" Value="False" />

dynamically calculate row count instead of being fixed