AddWalletPageView - reworked layout
DELETE
WalletWasabi.Fluent/Converters/ResolveApplicationResourceConverter.cs
-using System.Globalization;
-using Avalonia;
-using Avalonia.Data.Converters;
-
-namespace WalletWasabi.Fluent.Converters;
-
-// Not sure if there is a straight XAML-only way to do this
-// {StaticResource ResourceKey={Binding SomeString}} doesn't work :(
-public class ResolveApplicationResourceConverter : IValueConverter
-{
- public static readonly ResolveApplicationResourceConverter Instance = new();
-
- public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
- {
- if (Application.Current is null)
- {
- return AvaloniaProperty.UnsetValue;
- }
-
- if (value is not string key || string.IsNullOrEmpty(key))
- {
- return AvaloniaProperty.UnsetValue;
- }
-
- return
- Application.Current.Styles.TryGetResource(key, out var resource)
- ? resource
- : throw new InvalidOperationException($"Resource '{key}' not found.");
- }
-
- public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) =>
- throw new NotImplementedException();
-}

MODIFY
WalletWasabi.Fluent/Views/AddWallet/AddWalletPageView.axaml
WalletWasabi.Fluent/Views/AddWallet/AddWalletPageView.axaml
IsBusy="{Binding IsBusy}"
EnableNext="True"
NextContent="Continue">
- <ListBox Items="{Binding Options}" SelectedItem="{Binding SelectedOption}" Background="Transparent">
+ <ListBox Items="{Binding Options}" SelectedItem="{Binding SelectedOption}" Background="Transparent"
+ ScrollViewer.VerticalScrollBarVisibility="Disabled">
<ListBox.Styles>
<Style Selector="ListBoxItem">
<Setter Property="Cursor" Value="Hand" />
</Style>
<Style Selector="ListBoxItem /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Background" Value="Transparent" />
+ <Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style Selector="ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter, ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter">
<Setter Property="Opacity" Value="1" />
</Style>
- <Style Selector="WrapPanel.narrow">
- <Setter Property="ItemWidth" Value="125"/>
- <Setter Property="ItemHeight" Value="330"/>
- </Style>
-
- <Style Selector="WrapPanel">
- <Setter Property="ItemWidth" Value="210"/>
- <Setter Property="ItemWidth" Value="170"/>
- </Style>
-
</ListBox.Styles>
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
- <WrapPanel Orientation="Horizontal" VerticalAlignment="Center">
- <i:Interaction.Behaviors>
- <ir:AdaptiveBehavior>
- <ir:AdaptiveClassSetter MinWidth="0" MaxWidth="570" ClassName="narrow" />
- </ir:AdaptiveBehavior>
- </i:Interaction.Behaviors>
- </WrapPanel>
+ <UniformGrid Rows="1"/>
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.DataTemplates>
<DataTemplate>
- <c:SuggestionItem>
- <StackPanel Spacing="20">
+ <c:SuggestionItem VerticalAlignment="Center">
+ <StackPanel Spacing="20" Height="200" MaxWidth="180">
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" TextAlignment="Center" Height="34"/>
<Viewbox HorizontalAlignment="Center" Height="70">
- <PathIcon Data="{Binding IconName, Converter={x:Static conv:ResolveApplicationResourceConverter.Instance}}"
+ <PathIcon Data="{Binding IconName, Converter={x:Static conv:NavBarIconConverter.Instance}}"
Foreground="{StaticResource SystemAccentColor}"/>
</Viewbox>
<TextBlock Text="{Binding Description}"

AddWalletPageView - reworked layout