remove classes hack
MODIFY
WalletWasabi.Fluent/Controls/PrivacyTextControl.axaml
WalletWasabi.Fluent/Controls/PrivacyTextControl.axaml
</Transitions>
</Setter>
</Style>
+
+ <Style Selector="controls|PrivacyTextControl.monoSpaced">
+ <Setter Property="FontFamily" Value="{StaticResource MonospacedFont}" />
+ </Style>
</Styles>

MODIFY
WalletWasabi.Fluent/Controls/PrivacyTextControl.axaml.cs
WalletWasabi.Fluent/Controls/PrivacyTextControl.axaml.cs
@@ -3,7 +3,6 @@ using System;
using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
-using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using ReactiveUI;
@@ -21,9 +20,6 @@ namespace WalletWasabi.Fluent.Controls
public static readonly StyledProperty<string> TextProperty =
AvaloniaProperty.Register<PrivacyTextControl, string>(nameof(Text));
- public static readonly StyledProperty<string> TextBlockClassesProperty =
- AvaloniaProperty.Register<PrivacyContentControl, string>(nameof(TextBlockClasses));
-
public static readonly StyledProperty<uint> NumberOfPrivacyCharsProperty =
AvaloniaProperty.Register<PrivacyContentControl, uint>(nameof(NumberOfPrivacyChars), 5);
@@ -42,12 +38,6 @@ namespace WalletWasabi.Fluent.Controls
set => SetValue(TextProperty, value);
}
- public string TextBlockClasses
- {
- get => GetValue(TextBlockClassesProperty);
- set => SetValue(TextBlockClassesProperty, value);
- }
-
public uint NumberOfPrivacyChars
{
get => GetValue(NumberOfPrivacyCharsProperty);
@@ -60,20 +50,6 @@ namespace WalletWasabi.Fluent.Controls
set => SetValue(PrivacyTextProperty, value);
}
- protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
- {
- base.OnApplyTemplate(e);
-
- if (TextBlockClasses is { } classes)
- {
- var textBlock = e.NameScope.Find<TextBlock>("PART_Text");
- textBlock.Classes.Add(classes);
-
- var privacyTextBlock = e.NameScope.Find<TextBlock>("PART_PrivacyText");
- privacyTextBlock.Classes.Add(classes);
- }
- }
-
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
{
base.OnAttachedToVisualTree(e);

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
<DataTemplate>
<c:PrivacyTextControl x:DataType="history:HistoryItemViewModel"
Text="{Binding Date, StringFormat='{}{0:MM/dd/yyyy HH:mm}'}"
- TextBlockClasses="monoSpaced"
+ Classes="monoSpaced"
+ FontSize="15"
Margin="10 0"
NumberOfPrivacyChars="15"/>
</DataTemplate>
HorizontalAlignment="Right">
<PathIcon Data="{StaticResource arrow_down_right_regular}" Opacity="0.6" />
<c:PrivacyTextControl Text="{Binding IncomingAmount, Converter={x:Static converters:MoneyConverters.ToFormattedString}}"
- TextBlockClasses="monoSpaced"
+ Classes="monoSpaced"
+ FontSize="15"
NumberOfPrivacyChars="9" />
</StackPanel>
</DataTemplate>
HorizontalAlignment="Right">
<PathIcon Data="{StaticResource arrow_up_right_regular}" Opacity="0.6" />
<c:PrivacyTextControl Text="{Binding OutgoingAmount, Converter={x:Static converters:MoneyConverters.ToFormattedString}}"
- TextBlockClasses="monoSpaced"
+ Classes="monoSpaced"
+ FontSize="15"
NumberOfPrivacyChars="9" />
</StackPanel>
</DataTemplate>
<DataTemplate>
<c:PrivacyTextControl x:DataType="history:HistoryItemViewModel"
Text="{Binding Balance, Converter={x:Static converters:MoneyConverters.ToFormattedString}}"
- TextBlockClasses="monoSpaced"
+ Classes="monoSpaced"
+ FontSize="15"
NumberOfPrivacyChars="9"
HorizontalAlignment="Right"
Margin="10 0" />

remove classes hack