set default sort direction
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
using System;
using System.Collections.ObjectModel;
+using System.ComponentModel;
using System.Reactive;
using System.Reactive.Concurrency;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Threading.Tasks;
+using Avalonia.Collections;
using DynamicData;
using DynamicData.Binding;
using NBitcoin;
@@ -38,9 +40,15 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
this.WhenAnyValue(x => x.ShowCoinJoin)
.Subscribe(showCoinJoin => uiConfig.ShowCoinJoinInHistory = showCoinJoin);
+ var sortDescription = DataGridSortDescription.FromPath(nameof(HistoryItemViewModel.OrderIndex), ListSortDirection.Descending);
+ CollectionView = new DataGridCollectionView(Transactions);
+ CollectionView.SortDescriptions.Add(sortDescription);
+
RxApp.MainThreadScheduler.Schedule(async () => await UpdateAsync());
}
+ public DataGridCollectionView CollectionView { get; }
+
public ObservableCollection<HistoryItemViewModel> UnfilteredTransactions => _unfilteredTransactions;
public ObservableCollection<HistoryItemViewModel> Transactions => _transactions;

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
<Label Content="Transaction History" DockPanel.Dock="Left" FontWeight="Bold" FontSize="16"/>
</DockPanel>
- <DataGrid Items="{Binding Transactions}"
+ <DataGrid Items="{Binding CollectionView}"
CanUserResizeColumns="False"
DockPanel.Dock="Bottom">
<DataGrid.Styles>

set default sort direction