Question control
MODIFY
WalletWasabi.Fluent/App.axaml
WalletWasabi.Fluent/App.axaml
<StyleInclude Source="avares://WalletWasabi.Fluent/Controls/NavBarItem.axaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Controls/NavBarTreeItem.axaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Controls/TileButton.axaml" />
+ <StyleInclude Source="avares://WalletWasabi.Fluent/Controls/QuestionControl.axaml" />
</Application.Styles>
<NativeMenu.Menu>
<NativeMenu>

ADD
WalletWasabi.Fluent/Assets/PasswordFinder/numbers.png
WalletWasabi.Fluent/Assets/PasswordFinder/numbers.png
Binary files /dev/null and b/WalletWasabi.Fluent/Assets/PasswordFinder/numbers.png differ

ADD
WalletWasabi.Fluent/Assets/PasswordFinder/symbols.png
WalletWasabi.Fluent/Assets/PasswordFinder/symbols.png
Binary files /dev/null and b/WalletWasabi.Fluent/Assets/PasswordFinder/symbols.png differ

ADD
WalletWasabi.Fluent/Controls/QuestionControl.axaml
+<Styles xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:c="using:WalletWasabi.Fluent.Controls">
+
+ <Style Selector="c|QuestionControl">
+ <Setter Property="Template">
+ <ControlTemplate>
+ <DockPanel VerticalAlignment="Center" HorizontalAlignment="Stretch">
+ <DockPanel HorizontalAlignment="Stretch" MaxWidth="500" DockPanel.Dock="Bottom">
+ <Button HorizontalAlignment="Left" Content="No" Classes="yesNo" Command="{TemplateBinding YesCommand}" />
+ <Button HorizontalAlignment="Right" Content="Yes" Classes="action yesNo" IsDefault="True" Command="{TemplateBinding NoCommand}" />
+ </DockPanel>
+ <TextBlock Name="PART_Question"
+ Text="{TemplateBinding Text}"
+ FontSize="{TemplateBinding FontSize}"
+ TextWrapping="Wrap"
+ TextAlignment="Center"
+ HorizontalAlignment="Center"
+ DockPanel.Dock="Bottom"
+ Margin="0 10 0 50" />
+ <Viewbox MaxHeight="150" DockPanel.Dock="Top">
+ <Image Height="100" Source="{TemplateBinding Icon}" />
+ </Viewbox>
+ </DockPanel>
+ </ControlTemplate>
+ </Setter>
+ </Style>
+
+ <Style Selector="Button.yesNo">
+ <Setter Property="Width" Value="150"/>
+ <Setter Property="Height" Value="40"/>
+ <Setter Property="HorizontalContentAlignment" Value="Center"/>
+ <Setter Property="VerticalContentAlignment" Value="Center"/>
+ <Setter Property="FontSize" Value="{StaticResource FontSizeH6}"/>
+ <Setter Property="Padding" Value="0"/>
+ </Style>
+
+ <Style Selector="c|QuestionControl">
+ <Setter Property="FontSize" Value="{StaticResource FontSizeH6}" />
+ </Style>
+</Styles>

ADD
WalletWasabi.Fluent/Controls/QuestionControl.axaml.cs
+using System.Windows.Input;
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Media;
+
+namespace WalletWasabi.Fluent.Controls
+{
+ public class QuestionControl : Label
+ {
+ public static readonly StyledProperty<ICommand> YesCommandProperty =
+ AvaloniaProperty.Register<QuestionControl, ICommand>(nameof(YesCommand));
+
+ public static readonly StyledProperty<ICommand> NoCommandProperty =
+ AvaloniaProperty.Register<QuestionControl, ICommand>(nameof(NoCommand));
+
+ public static readonly StyledProperty<IImage> IconProperty =
+ AvaloniaProperty.Register<QuestionControl, IImage>(nameof(Icon));
+
+ public static readonly StyledProperty<string> TextProperty =
+ AvaloniaProperty.Register<QuestionControl, string>(nameof(Text));
+
+ public ICommand YesCommand
+ {
+ get => GetValue(YesCommandProperty);
+ set => SetValue(YesCommandProperty, value);
+ }
+
+ public ICommand NoCommand
+ {
+ get => GetValue(NoCommandProperty);
+ set => SetValue(NoCommandProperty, value);
+ }
+
+ public IImage Icon
+ {
+ get => GetValue(IconProperty);
+ set => SetValue(IconProperty, value);
+ }
+
+ public string Text
+ {
+ get => GetValue(TextProperty);
+ set => SetValue(TextProperty, value);
+ }
+ }
+
+
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/AddWallet/HardwareWallet/DetectedHardwareWalletView.axaml
WalletWasabi.Fluent/Views/AddWallet/HardwareWallet/DetectedHardwareWalletView.axaml
IsBusy="{Binding IsBusy}"
EnableCancel="False"
EnableBack="False"
- EnableNext="False">
- <DockPanel>
- <DockPanel.Styles>
- <Style Selector="Button.yesNo">
- <Setter Property="Width" Value="150"/>
- <Setter Property="Height" Value="40"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="FontSize" Value="{StaticResource FontSizeH6}"/>
- <Setter Property="Padding" Value="0"/>
- </Style>
- </DockPanel.Styles>
+ EnableNext="False"
+ ScrollViewer.VerticalScrollBarVisibility="Disabled">
- <StackPanel Spacing="200" HorizontalAlignment="Center" Orientation="Horizontal" DockPanel.Dock="Bottom" Margin="0 0 0 30">
- <Button Content="No" Classes="yesNo" Command="{Binding NoCommand}" />
- <Button Content="Yes" Classes="action yesNo" IsDefault="True" Command="{Binding NextCommand}" />
- </StackPanel>
-
- <StackPanel VerticalAlignment="Center" Spacing="40">
- <Image Height="180" Source="{Binding Path='Type', Converter={x:Static conv:WalletTypeImageConverter.Instance}}" />
- <TextBlock Text="{Binding TypeName, StringFormat={}{0} was detected. Is this correct?}" HorizontalAlignment="Center" />
- </StackPanel>
-
- </DockPanel>
+ <c:QuestionControl Text="{Binding TypeName, StringFormat={}{0} was detected. Is this correct?}"
+ YesCommand="{Binding NextCommand}"
+ NoCommand="{Binding NoCommand}"
+ Icon="{Binding Path='Type', Converter={x:Static conv:WalletTypeImageConverter.Instance}}"/>
</c:ContentArea>
</UserControl>

MODIFY
WalletWasabi.Fluent/Views/Login/PasswordFinder/ContainsNumbersView.axaml
WalletWasabi.Fluent/Views/Login/PasswordFinder/ContainsNumbersView.axaml
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Login.PasswordFinder"
xmlns:c="using:WalletWasabi.Fluent.Controls"
- xmlns:s="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:DataType="vm:ContainsNumbersViewModel"
x:CompileBindings="True"
<c:ContentArea Title="{Binding Title}"
EnableNext="False"
EnableCancel="True"
- EnableBack="True">
- <DockPanel>
- <DockPanel.Styles>
- <Style Selector="Button.yesNo">
- <Setter Property="Width" Value="150"/>
- <Setter Property="Height" Value="40"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="FontSize" Value="{StaticResource FontSizeH6}"/>
- <Setter Property="Padding" Value="0"/>
- </Style>
- </DockPanel.Styles>
- <DockPanel.Resources>
- <s:Boolean x:Key="True">True</s:Boolean>
- <s:Boolean x:Key="False">False</s:Boolean>
- </DockPanel.Resources>
+ EnableBack="True"
+ ScrollViewer.VerticalScrollBarVisibility="Disabled">
- <StackPanel Spacing="200" HorizontalAlignment="Center" Orientation="Horizontal" DockPanel.Dock="Bottom" Margin="0 0 0 30">
- <Button Content="No" Classes="yesNo" Command="{Binding AnswerCommand}" CommandParameter="{StaticResource False}"/>
- <Button Content="Yes" Classes="action yesNo" IsDefault="True" Command="{Binding AnswerCommand}" CommandParameter="{StaticResource True}"/>
- </StackPanel>
-
- <StackPanel VerticalAlignment="Center" Spacing="40">
- <TextBlock Text="0..9" FontSize="75" HorizontalAlignment="Center" />
- <TextBlock Text="Does your password contains numbers?" HorizontalAlignment="Center" />
- </StackPanel>
-
- </DockPanel>
+ <c:QuestionControl Text="Does your password contains numbers?"
+ YesCommand="{Binding YesCommand}"
+ NoCommand="{Binding NoCommand}"
+ Icon="/Assets/PasswordFinder/numbers.png"/>
</c:ContentArea>
</UserControl>

MODIFY
WalletWasabi.Fluent/Views/Login/PasswordFinder/ContainsSymbolsView.axaml
WalletWasabi.Fluent/Views/Login/PasswordFinder/ContainsSymbolsView.axaml
<c:ContentArea Title="{Binding Title}"
EnableNext="False"
EnableCancel="True"
- EnableBack="True">
- <DockPanel>
- <DockPanel.Styles>
- <Style Selector="Button.yesNo">
- <Setter Property="Width" Value="150"/>
- <Setter Property="Height" Value="40"/>
- <Setter Property="HorizontalAlignment" Value="Center"/>
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- <Setter Property="FontSize" Value="{StaticResource FontSizeH6}"/>
- <Setter Property="Padding" Value="0"/>
- </Style>
- </DockPanel.Styles>
- <DockPanel.Resources>
- <s:Boolean x:Key="True">True</s:Boolean>
- <s:Boolean x:Key="False">False</s:Boolean>
- </DockPanel.Resources>
+ EnableBack="True"
+ ScrollViewer.VerticalScrollBarVisibility="Disabled">
- <StackPanel Spacing="200" HorizontalAlignment="Center" Orientation="Horizontal" DockPanel.Dock="Bottom" Margin="0 0 0 30">
- <Button Content="No" Classes="yesNo" Command="{Binding AnswerCommand}" CommandParameter="{StaticResource False}"/>
- <Button Content="Yes" Classes="action yesNo" IsDefault="True" Command="{Binding AnswerCommand}" CommandParameter="{StaticResource True}"/>
- </StackPanel>
-
- <StackPanel VerticalAlignment="Center" Spacing="40">
- <TextBlock Text="%^*)#" FontSize="75" HorizontalAlignment="Center" />
- <TextBlock Text="Does your password contains special characters?" HorizontalAlignment="Center" />
- </StackPanel>
-
- </DockPanel>
+ <c:QuestionControl Text="Does your password contains special characters?"
+ YesCommand="{Binding YesCommand}"
+ NoCommand="{Binding NoCommand}"
+ Icon="/Assets/PasswordFinder/symbols.png"/>
</c:ContentArea>
</UserControl>

MODIFY
WalletWasabi.Fluent/Views/Login/PasswordFinder/SearchPasswordView.axaml
WalletWasabi.Fluent/Views/Login/PasswordFinder/SearchPasswordView.axaml
<TextBlock Text="{Binding Percentage, StringFormat={}{0}%}" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Panel>
</Viewbox>
+
</DockPanel>
</c:ContentArea>
</UserControl>

Question control