Add new pwbox
MODIFY
WalletWasabi.Gui/App.xaml
WalletWasabi.Gui/App.xaml
<StyleInclude Source="resm:WalletWasabi.Gui.Styles.Styles.xaml?assembly=WalletWasabi.Gui" />
<StyleInclude Source="resm:WalletWasabi.Gui.Icons.Icons.xaml?assembly=WalletWasabi.Gui" />
<StyleInclude Source="resm:WalletWasabi.Gui.Controls.NoparaPasswordBox.xaml?assembly=WalletWasabi.Gui" />
+ <StyleInclude Source="resm:WalletWasabi.Gui.Controls.LucasPasswordBox.xaml?assembly=WalletWasabi.Gui" />
<StyleInclude Source="resm:WalletWasabi.Gui.Controls.MultiTextBox.xaml?assembly=WalletWasabi.Gui" />
<StyleInclude Source="resm:WalletWasabi.Gui.Controls.BusyIndicator.xaml?assembly=WalletWasabi.Gui" />
<StyleInclude Source="resm:WalletWasabi.Gui.Controls.EditableTextBlock.xaml?assembly=WalletWasabi.Gui" />

ADD
WalletWasabi.Gui/Controls/LucasPasswordBox.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Controls.Primitives;
+using Avalonia.Data;
+using Avalonia.Styling;
+using ReactiveUI;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WalletWasabi.Gui.Controls
+{
+ public class LucasPasswordBox : ExtendedTextBox, IStyleable
+ {
+ Type IStyleable.StyleKey => typeof(LucasPasswordBox);
+ private Button _presenter;
+
+ public static readonly StyledProperty<bool> IsPasswordVisibleProperty =
+ AvaloniaProperty.Register<NoparaPasswordBox, bool>(nameof(IsPasswordVisible), defaultBindingMode: BindingMode.TwoWay);
+
+ public bool IsPasswordVisible
+ {
+ get => GetValue(IsPasswordVisibleProperty);
+ set => SetValue(IsPasswordVisibleProperty, value);
+ }
+
+ public LucasPasswordBox()
+ {
+ this.GetObservable(IsPasswordVisibleProperty).Subscribe(x =>
+ {
+ IsPasswordVisible = x;
+ });
+ }
+
+ protected override void OnTemplateApplied(TemplateAppliedEventArgs e)
+ {
+ base.OnTemplateApplied(e);
+ _presenter = e.NameScope.Get<Button>("PART_MaskedButton");
+
+ _presenter.WhenAnyValue(x => x.IsPressed)
+ .Subscribe(isPressed =>
+ {
+ IsPasswordVisible = isPressed;
+ });
+ }
+ }
+}

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletView.xaml
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletView.xaml
<StackPanel>
<TextBlock Text="Select a wallet to test its password!" FontWeight="Bold" />
</StackPanel>
- <controls:NoparaPasswordBox Password="{Binding Password}" Watermark="Password" UseFloatingWatermark="True" />
+ <controls:LucasPasswordBox Watermark="Password" UseFloatingWatermark="True" />
<StackPanel>
<TextBlock Text="Why the unconventional password masking?" FontWeight="Bold" />
<TextBlock Text="We received numerous reports on losing or mistyping passwords. This experiment aims to disrupt users' typical workflow at wallet generation, forcing them to pay more attention than otherwise would." TextWrapping="Wrap" />

Add new pwbox