separate TextBox style
MODIFY
WalletWasabi.Fluent/Styles/Styles.xaml
WalletWasabi.Fluent/Styles/Styles.xaml
</Style>
<!--TextBox style-->
- <Style Selector="TextBox /template/ Border#PART_BorderElement">
- <Setter Property="CornerRadius" Value="0" />
- </Style>
+
<!--Check mark-->
<Style Selector=":is(PathIcon).checkMark">
</Setter>
</Style>
- <Style Selector="TextBox">
- <Setter Property="Template">
- <ControlTemplate>
- <DockPanel>
-
- <!-- TODO bind Content -> Header and ContentTemplate -> HeaderTemplate -->
- <ContentPresenter x:Name="PART_HeaderContentPresenter"
- DockPanel.Dock="Top"
- TextBlock.FontWeight="Normal"
- TextBlock.Foreground="{DynamicResource TextControlHeaderForeground}"
- IsVisible="False"
- Margin="{DynamicResource TextBoxTopHeaderMargin}" />
-
- <DataValidationErrors DockPanel.Dock="Bottom" Margin="0 10 0 0" />
-
- <Panel>
- <Border
- Name="PART_BorderElement"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- MinWidth="{TemplateBinding MinWidth}"
- MinHeight="{TemplateBinding MinHeight}">
- </Border>
- <Border
- Margin="{TemplateBinding BorderThickness}">
- <Grid ColumnDefinitions="Auto,*,Auto">
- <ContentPresenter Grid.Column="0" Grid.ColumnSpan="1" Content="{TemplateBinding InnerLeftContent}" />
- <DockPanel x:Name="PART_InnerDockPanel" Grid.Column="1" Grid.ColumnSpan="1" Margin="{TemplateBinding Padding}">
- <TextBlock Name="PART_FloatingWatermark"
- Foreground="{DynamicResource SystemAccentColor}"
- FontSize="{TemplateBinding FontSize}"
- Text="{TemplateBinding Watermark}"
- DockPanel.Dock="Top" />
- <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
- VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
- <Panel>
- <TextBlock Name="PART_Watermark"
- Opacity="0.5"
- Text="{TemplateBinding Watermark}"
- TextAlignment="{TemplateBinding TextAlignment}"
- TextWrapping="{TemplateBinding TextWrapping}"
- IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.IsNullOrEmpty}}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- <!-- TODO eliminate this margin... text layout issue? -->
- <TextPresenter Name="PART_TextPresenter"
- Margin="0 1 0 0"
- Text="{TemplateBinding Text, Mode=TwoWay}"
- CaretIndex="{TemplateBinding CaretIndex}"
- SelectionStart="{TemplateBinding SelectionStart}"
- SelectionEnd="{TemplateBinding SelectionEnd}"
- TextAlignment="{TemplateBinding TextAlignment}"
- TextWrapping="{TemplateBinding TextWrapping}"
- PasswordChar="{TemplateBinding PasswordChar}"
- RevealPassword="{TemplateBinding RevealPassword}"
- SelectionBrush="{TemplateBinding SelectionBrush}"
- SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
- CaretBrush="{TemplateBinding CaretBrush}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Panel>
- </ScrollViewer>
- </DockPanel>
- <ContentPresenter Grid.Column="2" Grid.ColumnSpan="1" Content="{TemplateBinding InnerRightContent}" />
- </Grid>
- </Border>
- </Panel>
- </DockPanel>
- </ControlTemplate>
- </Setter>
- </Style>
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/OptionButton.xaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/ActionButton.xaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/Label.xaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/InvisibleButton.xaml" />
+ <StyleInclude Source="avares://WalletWasabi.Fluent/Styles/TextBox.xaml" />
</Styles>
\ No newline at end of file

ADD
WalletWasabi.Fluent/Styles/TextBox.xaml
+<Styles xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+ <Style Selector="TextBox">
+ <Setter Property="Template">
+ <ControlTemplate>
+ <DockPanel>
+
+ <!-- TODO bind Content -> Header and ContentTemplate -> HeaderTemplate -->
+ <ContentPresenter x:Name="PART_HeaderContentPresenter"
+ DockPanel.Dock="Top"
+ TextBlock.FontWeight="Normal"
+ TextBlock.Foreground="{DynamicResource TextControlHeaderForeground}"
+ IsVisible="False"
+ Margin="{DynamicResource TextBoxTopHeaderMargin}" />
+
+ <DataValidationErrors DockPanel.Dock="Bottom" Margin="0 10 0 0" />
+
+ <Panel>
+ <Border
+ Name="PART_BorderElement"
+ Background="{TemplateBinding Background}"
+ BorderBrush="{TemplateBinding BorderBrush}"
+ BorderThickness="{TemplateBinding BorderThickness}"
+ MinWidth="{TemplateBinding MinWidth}"
+ MinHeight="{TemplateBinding MinHeight}">
+ </Border>
+
+ <Border
+ Margin="{TemplateBinding BorderThickness}">
+ <Grid ColumnDefinitions="Auto,*,Auto">
+ <ContentPresenter Grid.Column="0" Grid.ColumnSpan="1" Content="{TemplateBinding InnerLeftContent}" />
+ <DockPanel x:Name="PART_InnerDockPanel" Grid.Column="1" Grid.ColumnSpan="1" Margin="{TemplateBinding Padding}">
+ <TextBlock Name="PART_FloatingWatermark"
+ Foreground="{DynamicResource SystemAccentColor}"
+ FontSize="{TemplateBinding FontSize}"
+ Text="{TemplateBinding Watermark}"
+ DockPanel.Dock="Top" />
+ <ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
+ VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
+ <Panel>
+ <TextBlock Name="PART_Watermark"
+ Opacity="0.5"
+ Text="{TemplateBinding Watermark}"
+ TextAlignment="{TemplateBinding TextAlignment}"
+ TextWrapping="{TemplateBinding TextWrapping}"
+ IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.IsNullOrEmpty}}"
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
+ <!-- TODO eliminate this margin... text layout issue? -->
+ <TextPresenter Name="PART_TextPresenter"
+ Margin="0 1 0 0"
+ Text="{TemplateBinding Text, Mode=TwoWay}"
+ CaretIndex="{TemplateBinding CaretIndex}"
+ SelectionStart="{TemplateBinding SelectionStart}"
+ SelectionEnd="{TemplateBinding SelectionEnd}"
+ TextAlignment="{TemplateBinding TextAlignment}"
+ TextWrapping="{TemplateBinding TextWrapping}"
+ PasswordChar="{TemplateBinding PasswordChar}"
+ RevealPassword="{TemplateBinding RevealPassword}"
+ SelectionBrush="{TemplateBinding SelectionBrush}"
+ SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
+ CaretBrush="{TemplateBinding CaretBrush}"
+ HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
+ VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
+ </Panel>
+ </ScrollViewer>
+ </DockPanel>
+ <ContentPresenter Grid.Column="2" Grid.ColumnSpan="1" Content="{TemplateBinding InnerRightContent}" />
+ </Grid>
+ </Border>
+ </Panel>
+ </DockPanel>
+ </ControlTemplate>
+ </Setter>
+ </Style>
+
+ <Style Selector="TextBox /template/ Border#PART_BorderElement">
+ <Setter Property="CornerRadius" Value="0" />
+ </Style>
+
+</Styles>
\ No newline at end of file

separate TextBox style