Fix margins and add IsReadOnly property
MODIFY
WalletWasabi.Fluent/Controls/TagsBox.axaml
WalletWasabi.Fluent/Controls/TagsBox.axaml
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="MinHeight" Value="{DynamicResource TextControlThemeMinHeight}" />
<Setter Property="MinWidth" Value="{DynamicResource TextControlThemeMinWidth}" />
- <Setter Property="Padding" Value="{DynamicResource TextControlThemePadding}" />
+ <Setter Property="Padding" Value="{DynamicResource TagsBoxBorderPadding}" />
<Setter Property="Focusable" Value="True" />
<Setter Property="Cursor" Value="IBeam" />
<Setter Property="Template">
<ControlTemplate>
- <DataValidationErrors>
+ <!-- <DataValidationErrors> -->
<Border x:Name="PART_Border" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
</ItemsPresenter.ItemsPanel>
</ItemsPresenter>
</Border>
- </DataValidationErrors>
+ <!-- </DataValidationErrors> -->
</ControlTemplate>
</Setter>
<Setter Property="(ScrollViewer.HorizontalScrollBarVisibility)" Value="Disabled" />
</Style>
<Style Selector="c|TagsBox c|TagControl">
- <Setter Property="Margin" Value="0,0,5,5" />
+ <Setter Property="Margin" Value="0,0,4,4" />
+ </Style>
+
+ <Style Selector="c|TagsBox AutoCompleteBox /template/ TextBox">
+ <Setter Property="Padding" Value="0" />
+ <Setter Property="Margin" Value="0" />
</Style>
<Style Selector="c|TagsBox AutoCompleteBox">
<Setter Property="Background" Value="{x:Null}" />
- <Setter Property="Padding" Value="0,0,3,0 " />
- <Setter Property="Margin" Value="0,3,0,0" />
+ <Setter Property="Padding" Value="4,5,0,0 " />
+ <Setter Property="Margin" Value="0,0,0,0" />
</Style>
<Style Selector="c|TagsBox AutoCompleteBox /template/ TextBox">
<Setter Property="Margin" Value="0" />
</Style>
+ <Style Selector="c|TagsBox AutoCompleteBox /template/ TextBox /template/ DataValidationErrors">
+ <Setter Property="IsVisible" Value="False" />
+ </Style>
+
<Style Selector="c|TagsBox AutoCompleteBox /template/ TextBox /template/ Border#PART_BorderElement">
<Setter Property="IsVisible" Value="False" />
</Style>

MODIFY
WalletWasabi.Fluent/Controls/TagsBox.axaml.cs
WalletWasabi.Fluent/Controls/TagsBox.axaml.cs
@@ -50,6 +50,8 @@ namespace WalletWasabi.Fluent.Controls
o => o.CompletedCommand,
(o, v) => o.CompletedCommand = v);
+ public static readonly StyledProperty<bool> IsReadOnlyProperty = AvaloniaProperty.Register<TagsBox, bool>("IsReadOnly");
+
static TagsBox()
{
ItemsProperty.OverrideMetadata<TagsBox>(
@@ -86,6 +88,12 @@ namespace WalletWasabi.Fluent.Controls
set => SetAndRaise(CompletedCommandProperty, ref _completedCommand, value);
}
+ public bool IsReadOnly
+ {
+ get => GetValue(IsReadOnlyProperty);
+ set => SetValue(IsReadOnlyProperty, value);
+ }
+
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);

MODIFY
WalletWasabi.Fluent/Styles/Themes/Base.axaml
WalletWasabi.Fluent/Styles/Themes/Base.axaml
<SolidColorBrush x:Key="WarningMessageForeground">#FFDD00</SolidColorBrush>
<StaticResource x:Key="SystemControlErrorTextForegroundBrush" ResourceKey="SystemErrorTextColor" />
<SolidColorBrush x:Key="HyperLinkForeground">#00A2E8</SolidColorBrush>
+ <Thickness x:Key="TagsBoxBorderPadding">4,4,0,0</Thickness>
</Styles.Resources>
</Styles>

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/RecoverWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/RecoverWalletViewModel.cs
@@ -138,7 +138,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
private Interaction<(KeyPath, int), (KeyPath?, int?)> AdvancedOptionsInteraction { get; }
public ObservableCollection<RecoveryWordIndexed> Mnemonics { get; } =
- new ObservableCollection<RecoveryWordIndexed>();
+ new ObservableCollection<RecoveryWordIndexed>() { new RecoveryWordIndexed(0, "maximum")};
private void ValidateMnemonics(IValidationErrors errors)
{

MODIFY
WalletWasabi.Fluent/Views/AddWallet/RecoverWalletView.axaml
WalletWasabi.Fluent/Views/AddWallet/RecoverWalletView.axaml
<c:TagsBox x:Name="SeedTagsBox"
DockPanel.Dock="Top"
ItemCountLimit="12"
+ IsReadOnly="False"
RestrictInputToSuggestions="True"
Items="{Binding Mnemonics}"
Suggestions="{Binding Suggestions}"

Fix margins and add IsReadOnly property