Load QR code asynchronously
MODIFY
WalletWasabi.Gui/Controls/QrCode.cs
WalletWasabi.Gui/Controls/QrCode.cs
@@ -19,6 +19,11 @@ namespace WalletWasabi.Gui.Controls
{
public class QrCode : Control
{
+ static QrCode()
+ {
+ AffectsMeasure(MatrixProperty);
+ }
+
public static readonly DirectProperty<QrCode, bool[,]> MatrixProperty =
AvaloniaProperty.RegisterDirect<QrCode, bool[,]>(
nameof(Matrix),

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/ReceiveTabView.xaml
<ListBox.ItemTemplate>
<DataTemplate>
<Grid>
- <Expander ExpandDirection="Down">
- <StackPanel Background="#FFFEFEFE">
- <controls:QrCode Matrix="{Binding QrCode}" Height="200" Margin="10 10 10 20" HorizontalAlignment="Center" />
- </StackPanel>
+ <Expander ExpandDirection="Down" IsExpanded="{Binding IsExpanded}">
+ <Panel>
+ <Panel Width="240" Background="#FFFEFEFE">
+ <controls:QrCode Matrix="{Binding QrCode}" HorizontalAlignment="Center" Margin="20" />
+ </Panel>
+ <controls:Spinner Height="100" Width="100" IsVisible="{Binding IsBusy}" />
+ </Panel>
</Expander>
<Grid ColumnDefinitions="400, *, 100" Margin="30 0 0 0">
<TextBlock Text="{Binding Address}" />

Load QR code asynchronously