Create a style for validation rather than use avalonia default.
MODIFY
WalletWasabi.Gui/Styles/Styles.xaml
WalletWasabi.Gui/Styles/Styles.xaml
<Style.Resources>
<SolidColorBrush x:Key="ThemeAccentBrush">#007ACC</SolidColorBrush>
<SolidColorBrush x:Key="HyperLinkForeground">#00A2E8</SolidColorBrush>
- <SolidColorBrush x:Key="ErrorMessageForeground">#F25022</SolidColorBrush>
+ <SolidColorBrush x:Key="ErrorBrush">#F25022</SolidColorBrush>
<SolidColorBrush x:Key="WarningMessageForeground">#FFDD00</SolidColorBrush>
<SolidColorBrush x:Key="GreenBrush">#00DD10</SolidColorBrush>
</Style>
<Style Selector=".errorMessage">
- <Setter Property="TextBlock.Foreground" Value="{DynamicResource ErrorMessageForeground}" />
+ <Setter Property="TextBlock.Foreground" Value="{DynamicResource ErrorBrush}" />
</Style>
<Style Selector=".warningMessage">
<Style Selector="TextBox">
<Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderDarkBrush}" />
</Style>
+
+ <Style Selector="DataValidationErrors">
+ <Setter Property="Template">
+ <ControlTemplate>
+ <DockPanel LastChildFill="True">
+ <ContentControl DockPanel.Dock="Bottom"
+ ContentTemplate="{TemplateBinding ErrorTemplate}"
+ DataContext="{TemplateBinding Owner}"
+ Content="{Binding (DataValidationErrors.Errors)}"
+ IsVisible="{Binding (DataValidationErrors.HasErrors)}"/>
+ <ContentPresenter Name="PART_ContentPresenter"
+ Background="{TemplateBinding Background}"
+ BorderThickness="{TemplateBinding BorderThickness}"
+ ContentTemplate="{TemplateBinding ContentTemplate}"
+ Content="{TemplateBinding Content}"
+ Padding="{TemplateBinding Padding}"/>
+ </DockPanel>
+ </ControlTemplate>
+ </Setter>
+ <Setter Property="ErrorTemplate">
+ <DataTemplate>
+ <Grid>
+ <Grid.Styles>
+ <Style>
+ <Setter Property="TextBlock.Foreground" Value="{DynamicResource ErrorBrush}" />
+ </Style>
+ </Grid.Styles>
+ <ItemsControl Items="{Binding}" MemberSelector="Message"/>
+ </Grid>
+ </DataTemplate>
+ </Setter>
+</Style>
+ <Style Selector="TextBox:error /template/ Border#border">
+ <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderMidBrush}"/>
+ </Style>
+
+ <Style Selector="TextBox">
+ <Setter Property="Background" Value="{DynamicResource ThemeBackgroundBrush}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderMidBrush}"/>
+ <Setter Property="BorderThickness" Value="{DynamicResource ThemeBorderThickness}"/>
+ <Setter Property="Padding" Value="4"/>
+ <Setter Property="Template">
+ <ControlTemplate>
+ <DockPanel LastChildFill="True">
+ <Border Name="border"
+ Background="{TemplateBinding Background}"
+ BorderBrush="{TemplateBinding BorderBrush}"
+ BorderThickness="{TemplateBinding BorderThickness}" DockPanel.Dock="Top">
+ <DockPanel Margin="{TemplateBinding Padding}">
+
+ <TextBlock Name="floatingWatermark"
+ Foreground="{DynamicResource ThemeAccentBrush}"
+ FontSize="{DynamicResource FontSizeSmall}"
+ Text="{TemplateBinding Watermark}"
+ DockPanel.Dock="Top">
+ <TextBlock.IsVisible>
+ <MultiBinding Converter="{x:Static BoolConverters.And}">
+ <Binding RelativeSource="{RelativeSource TemplatedParent}"
+ Path="UseFloatingWatermark"/>
+ <Binding RelativeSource="{RelativeSource TemplatedParent}"
+ Path="Text"
+ Converter="{x:Static StringConverters.NotNullOrEmpty}"/>
+ </MultiBinding>
+ </TextBlock.IsVisible>
+ </TextBlock>
+ <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
+ VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
+
+ <Panel>
+ <TextBlock Name="watermark"
+ Opacity="0.5"
+ Text="{TemplateBinding Watermark}"
+ IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.NullOrEmpty}}"/>
+ <TextPresenter Name="PART_TextPresenter"
+ Text="{TemplateBinding Text, Mode=TwoWay}"
+ CaretIndex="{TemplateBinding CaretIndex}"
+ SelectionStart="{TemplateBinding SelectionStart}"
+ SelectionEnd="{TemplateBinding SelectionEnd}"
+ TextAlignment="{TemplateBinding TextAlignment}"
+ TextWrapping="{TemplateBinding TextWrapping}"
+ PasswordChar="{TemplateBinding PasswordChar}"/>
+ </Panel>
+ </ScrollViewer>
+ </DockPanel>
+ </Border>
+ <Border Margin="{TemplateBinding Padding}"
+ BorderThickness="{TemplateBinding BorderThickness}"
+ BorderBrush="{TemplateBinding Background}">
+ <DataValidationErrors />
+ </Border>
+ </DockPanel>
+ </ControlTemplate>
+ </Setter>
+ </Style>
+ <Style Selector="TextBox:pointerover /template/ Border#border">
+ <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderDarkBrush}"/>
+ </Style>
+ <Style Selector="TextBox:focus /template/ Border#border">
+ <Setter Property="BorderBrush" Value="{DynamicResource ThemeBorderDarkBrush}"/>
+ </Style>
</Styles>

Create a style for validation rather than use avalonia default.