add option to hide the counter
MODIFY
WalletWasabi.Fluent/Controls/TagControl.axaml
WalletWasabi.Fluent/Controls/TagControl.axaml
</LayoutTransformControl.Transitions>
</LayoutTransformControl>
<StackPanel Margin="12,6,12,6" DockPanel.Dock="Left" Spacing="5" Orientation="Horizontal">
- <TextBlock Name="PART_Index" />
+ <TextBlock Name="PART_Index" IsVisible="{TemplateBinding EnableCounter}"/>
<ContentPresenter Name="PART_ContentPresenter"
Content="{TemplateBinding Content}"
Padding="{TemplateBinding Padding}"

MODIFY
WalletWasabi.Fluent/Controls/TagControl.axaml.cs
WalletWasabi.Fluent/Controls/TagControl.axaml.cs
using System;
using System.Reactive.Disposables;
+using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Interactivity;
@@ -12,6 +13,15 @@ namespace WalletWasabi.Fluent.Controls
private IDisposable? _subscription;
private TagsBox? _parentTagBox;
+ public static readonly StyledProperty<bool> EnableCounterProperty =
+ AvaloniaProperty.Register<TagControl, bool>(nameof(EnableCounter));
+
+ public bool EnableCounter
+ {
+ get => GetValue(EnableCounterProperty);
+ set => SetValue(EnableCounterProperty, value);
+ }
+
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);

MODIFY
WalletWasabi.Fluent/Controls/TagsBox.axaml
WalletWasabi.Fluent/Controls/TagsBox.axaml
</ItemsPresenter.ItemsPanel>
<ItemsPresenter.ItemTemplate>
<DataTemplate>
- <c:TagControl Content="{Binding .}" />
+ <c:TagControl Content="{Binding .}" EnableCounter="{Binding #PART_DockPanel.TemplatedParent.EnableCounter}" />
</DataTemplate>
</ItemsPresenter.ItemTemplate>
</ItemsPresenter>
</ItemsPresenter.ItemsPanel>
<ItemsPresenter.ItemTemplate>
<DataTemplate>
- <c:TagControl Content="{Binding .}" />
+ <c:TagControl Content="{Binding .}" EnableCounter="{Binding #PART_DockPanel.TemplatedParent.EnableCounter}" />
</DataTemplate>
</ItemsPresenter.ItemTemplate>
</ItemsPresenter>

MODIFY
WalletWasabi.Fluent/Controls/TagsBox.axaml.cs
WalletWasabi.Fluent/Controls/TagsBox.axaml.cs
@@ -80,6 +80,9 @@ namespace WalletWasabi.Fluent.Controls
public static readonly StyledProperty<bool> IsReadOnlyProperty =
AvaloniaProperty.Register<TagsBox, bool>(nameof(IsReadOnly));
+ public static readonly StyledProperty<bool> EnableCounterProperty =
+ AvaloniaProperty.Register<TagsBox, bool>(nameof(EnableCounter));
+
[Content]
public IEnumerable<string>? Items
{
@@ -147,6 +150,12 @@ namespace WalletWasabi.Fluent.Controls
set => SetValue(AllowDuplicationProperty, value);
}
+ public bool EnableCounter
+ {
+ get => GetValue(EnableCounterProperty);
+ set => SetValue(EnableCounterProperty, value);
+ }
+
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);

MODIFY
WalletWasabi.Fluent/Views/AddWallet/RecoverWalletView.axaml
WalletWasabi.Fluent/Views/AddWallet/RecoverWalletView.axaml
Items="{Binding Mnemonics}"
Suggestions="{Binding Suggestions}"
CompletedCommand="{Binding NextCommand}"
- AllowDuplication="True">
+ AllowDuplication="True"
+ EnableCounter="True">
<i:Interaction.Behaviors>
<behaviors:FocusOnAttachedBehavior />
</i:Interaction.Behaviors>

add option to hide the counter