hide add wallet options until wallet name is valid.
MODIFY
WalletWasabi.Fluent/Styles/Styles.xaml
WalletWasabi.Fluent/Styles/Styles.xaml
<Setter Property="(TextBlock.FontWeight)" Value="Bold" />
<Setter Property="Margin" Value="0 0 0 10" />
</Style>
- <Style Selector="TextBox /template/ Border#PART_BorderElement">
- <Setter Property="CornerRadius" Value="0" />
- </Style>
- <Style Selector="TextBox:error /template/ Border#PART_BorderElement">
- <Setter Property="BorderBrush" Value="{StaticResource TextControlErrorBorderBrush}" />
- </Style>
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/OptionButton.xaml" />
</Styles>

MODIFY
WalletWasabi.Fluent/ViewModels/AddWalletPageViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWalletPageViewModel.cs
-using Avalonia.Input;
+using System.Reactive.Linq;
using ReactiveUI;
-using WalletWasabi.Gui.Validation;
+using System;
namespace WalletWasabi.Fluent.ViewModels
{
public class AddWalletPageViewModel : NavBarItemViewModel
{
private string _walletName = "";
+ private bool _optionsEnabled;
public AddWalletPageViewModel(IScreen screen) : base(screen)
{
Title = "Add Wallet";
+
+ this.WhenAnyValue(x => x.WalletName)
+ .Select(x => !string.IsNullOrWhiteSpace(x))
+ .Subscribe(x => OptionsEnabled = x);
}
public override string IconName => "add_circle_regular";
@@ -20,5 +25,11 @@ namespace WalletWasabi.Fluent.ViewModels
get => _walletName;
set => this.RaiseAndSetIfChanged(ref _walletName, value);
}
+
+ public bool OptionsEnabled
+ {
+ get => _optionsEnabled;
+ set => this.RaiseAndSetIfChanged(ref _optionsEnabled, value);
+ }
}
}

MODIFY
WalletWasabi.Fluent/Views/AddWalletPageView.axaml
WalletWasabi.Fluent/Views/AddWalletPageView.axaml
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Padding" Value="0" />
+ <Setter Property="IsVisible" Value="{Binding OptionsEnabled}" />
</Style>
</StackPanel.Styles>
<Button Classes="option">

hide add wallet options until wallet name is valid.