Move history table placeholder to user control
ADD
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTablePlaceholder.axaml
+<UserControl xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:history="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Home.History"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:DataType="history:HistoryViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Wallets.Home.History.HistoryTablePlaceholder">
+ <Border ClipToBounds="False"
+ CornerRadius="5"
+ Background="{DynamicResource TileRegionColor}"
+ Margin="6"
+ Padding="16"
+ BoxShadow="{DynamicResource InfoBoxShadow}">
+ <DockPanel HorizontalAlignment="Center" VerticalAlignment="Center">
+ <Label Content="Nothing to show here yet."
+ Classes="bold center wrap h5"
+ MaxWidth="400"
+ Margin="0,24,0,0"
+ HorizontalAlignment="Center"
+ VerticalAlignment="Center"
+ DockPanel.Dock="Bottom"/>
+ <Label Content="Recent transactions will appear here once you make some transactions or when your wallet finishes loading."
+ Classes="wrap center"
+ MaxWidth="400"
+ Margin="0,0,24,0"
+ HorizontalContentAlignment="Center"
+ HorizontalAlignment="Center"
+ VerticalAlignment="Center"
+ DockPanel.Dock="Bottom"/>
+ <Viewbox MaxHeight="234" Margin="24,24,24,24">
+ <Image HorizontalAlignment="Center" VerticalAlignment="Center">
+ <Image.Source>
+ <DrawingImage Drawing="{StaticResource history_table_empty_wallet}"/>
+ </Image.Source>
+ </Image>
+ </Viewbox>
+ </DockPanel>
+ </Border>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTablePlaceholder.axaml.cs
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Wallets.Home.History
+{
+ public class HistoryTablePlaceholder : UserControl
+ {
+ public HistoryTablePlaceholder()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+ }
+}

MODIFY
WalletWasabi.Fluent/Views/Wallets/WalletView.axaml
WalletWasabi.Fluent/Views/Wallets/WalletView.axaml
DataContext="{Binding History}"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
IsVisible="{Binding !IsTransactionHistoryEmpty}"/>
- <Border ClipToBounds="False"
- CornerRadius="5"
- Background="{DynamicResource TileRegionColor}"
- Margin="6"
- Padding="16"
- BoxShadow="{DynamicResource InfoBoxShadow}"
+ <history:HistoryTablePlaceholder Name="HistoryTablePlaceholder"
DataContext="{Binding History}"
- IsVisible="{Binding IsTransactionHistoryEmpty}">
- <DockPanel HorizontalAlignment="Center" VerticalAlignment="Center">
- <Label Content="Nothing to show here yet."
- Classes="bold center wrap h5"
- MaxWidth="400"
- Margin="0,24,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- DockPanel.Dock="Bottom"/>
- <Label Content="Recent transactions will appear here once you make some transactions or when your wallet finishes loading."
- Classes="wrap center"
- MaxWidth="400"
- Margin="0,0,24,0"
- HorizontalContentAlignment="Center"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- DockPanel.Dock="Bottom"/>
- <Viewbox MaxHeight="234" Margin="24,24,24,24">
- <Image HorizontalAlignment="Center" VerticalAlignment="Center">
- <Image.Source>
- <DrawingImage Drawing="{StaticResource history_table_empty_wallet}"/>
- </Image.Source>
- </Image>
- </Viewbox>
- </DockPanel>
- </Border>
+ HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
+ IsVisible="{Binding IsTransactionHistoryEmpty}"/>
</Panel>
</DockPanel>
</c:ContentArea>

Move history table placeholder to user control