try use attached property to transfer validation state...
MODIFY
WalletWasabi.Fluent/Styles/TextBox.axaml
WalletWasabi.Fluent/Styles/TextBox.axaml
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:behaviors="using:WalletWasabi.Fluent.Behaviors"
xmlns:i="using:Avalonia.Xaml.Interactivity"
- xmlns:converters="using:WalletWasabi.Gui.Converters">
+ xmlns:converters="using:WalletWasabi.Gui.Converters"
+ xmlns:validation="clr-namespace:WalletWasabi.Fluent.Validation"
+ xmlns:conv="clr-namespace:WalletWasabi.Fluent.Converters">
<Styles.Resources>
<Thickness x:Key="TextControlBorderThemeThickness">0,0,0,2</Thickness>
<Thickness x:Key="TextControlBorderThemeThicknessFocused">0,0,0,2</Thickness>
<DataValidationErrors DockPanel.Dock="Bottom" Margin="0 10 0 0" />
<DockPanel>
- <PathIcon Classes="checkMark" Margin="15 0" VerticalAlignment="Center" DockPanel.Dock="Right">
+ <PathIcon Classes="checkMark checkMarkDataValidation" Margin="15 0" VerticalAlignment="Center" DockPanel.Dock="Right">
<i:Interaction.Behaviors>
<behaviors:CheckMarkVisibilityBehavior OwnerTextBox="{Binding ., RelativeSource={RelativeSource TemplatedParent}}" />
</i:Interaction.Behaviors>
</PathIcon>
+ <PathIcon Classes="checkMark checkMarkBoolean"
+ Margin="15 0"
+ VerticalAlignment="Center"
+ DockPanel.Dock="Right"
+ Opacity="{Binding (validation:TextBoxValidation.IsEnabled), RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static conv:BoolOpacityConverters.BoolToOpacity}}" />
<Panel>
<Border
Name="PART_BorderElement"
<Setter Property="MinHeight" Value="20" />
</Style>
- <Style Selector="TextBox:not(.hasCheckMark) /template/ PathIcon.checkMark">
+ <Style Selector="TextBox:not(.hasCheckMark) /template/ PathIcon.checkMark.checkMarkDataValidation">
<Setter Property="IsVisible" Value="False" />
</Style>
- <Style Selector="TextBox.hasCheckMark /template/ PathIcon.checkMark">
+ <Style Selector="TextBox.hasCheckMark /template/ PathIcon.checkMark.checkMarkDataValidation">
<Setter Property="IsVisible" Value="True" />
</Style>
+ <Style Selector="TextBox:not(.hasCheckMarkBoolean) /template/ PathIcon.checkMark.checkMarkBoolean">
+ <Setter Property="IsVisible" Value="False" />
+ </Style>
+
+ <Style Selector="TextBox.hasCheckMarkBoolean /template/ PathIcon.checkMark.checkMarkBoolean">
+ <Setter Property="IsVisible" Value="False" />
+ </Style>
+
<Style Selector="TextBox.selectable_text_block">
<Setter Property="IsReadOnly" Value="True" />
<Setter Property="Margin" Value="0" />

ADD
WalletWasabi.Fluent/Validation/TextBoxValidation.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Data;
+
+namespace WalletWasabi.Fluent.Validation
+{
+ public class TextBoxValidation : AvaloniaObject
+ {
+ public static readonly AttachedProperty<bool> IsEnabledProperty =
+ AvaloniaProperty.RegisterAttached<IAvaloniaObject, bool>("IsEnabled", typeof(TextBoxValidation),
+ defaultBindingMode: BindingMode.TwoWay);
+
+ public static bool GetIsEnabled(IAvaloniaObject obj)
+ {
+ return (bool) obj.GetValue(IsEnabledProperty);
+ }
+
+ public static void SetIsEnabled(IAvaloniaObject obj, bool value)
+ {
+ obj.SetValue(IsEnabledProperty, value);
+ }
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/AddWallet/Create/ConfirmRecoveryWordsView.axaml
WalletWasabi.Fluent/Views/AddWallet/Create/ConfirmRecoveryWordsView.axaml
xmlns:conv="using:WalletWasabi.Fluent.Converters"
xmlns:c="using:WalletWasabi.Fluent.Controls"
xmlns:create="using:WalletWasabi.Fluent.ViewModels.AddWallet.Create"
+ xmlns:validation="clr-namespace:WalletWasabi.Fluent.Validation"
mc:Ignorable="d" d:DesignWidth="428" d:DesignHeight="371"
x:DataType="create:ConfirmRecoveryWordsViewModel"
x:CompileBindings="True"
<ItemsControl.ItemTemplate>
<DataTemplate>
<DockPanel HorizontalAlignment="Left">
- <PathIcon Classes="checkMark" Margin="15 42 0 0" Opacity="{Binding IsConfirmed, Converter={x:Static conv:BoolOpacityConverters.BoolToOpacity}}" VerticalAlignment="Top" DockPanel.Dock="Right" />
+ <!-- <PathIcon Classes="checkMark" Margin="15 42 0 0" Opacity="{Binding IsConfirmed, Converter={x:Static conv:BoolOpacityConverters.BoolToOpacity}}" VerticalAlignment="Top" DockPanel.Dock="Right" /> -->
<Label Content="{Binding Index, StringFormat=Recovery word {0}}" DockPanel.Dock="Top" />
- <TextBox Watermark="Type the word here..." Text="{Binding Input}" IsEnabled="{Binding !IsConfirmed}" DockPanel.Dock="Top" Width="350">
+ <TextBox Watermark="Type the word here..." Classes="hasCheckMarkBoolean" validation:TextBoxValidation.IsEnabled="{Binding IsConfirmed}" Text="{Binding Input}" IsEnabled="{Binding !IsConfirmed}" DockPanel.Dock="Top" Width="350">
<i:Interaction.Behaviors>
<behaviors:FocusNextItemBehavior IsFocused="{Binding !IsConfirmed}" />
</i:Interaction.Behaviors>

try use attached property to transfer validation state...