Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kikipoulet committed Jan 21, 2025
1 parent e55368e commit 1659bda
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 16 deletions.
11 changes: 11 additions & 0 deletions SukiUI.Demo/Features/ControlsLibrary/TextView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:showMeTheXaml="clr-namespace:ShowMeTheXaml;assembly=ShowMeTheXaml.Avalonia"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
d:DesignHeight="450"
d:DesignWidth="800"
x:DataType="controlsLibrary:TextViewModel"
Expand Down Expand Up @@ -73,6 +74,16 @@
<showMeTheXaml:XamlDisplay UniqueId="TextBox1">
<TextBox />
</showMeTheXaml:XamlDisplay>
<showMeTheXaml:XamlDisplay UniqueId="TextBox1Search">
<TextBox >
<TextBox.InnerLeftContent>
<avalonia:MaterialIcon Kind="Search" Foreground="{DynamicResource SukiLowText}" Margin="5,0" Height="17" Width="17" VerticalAlignment="Center"/>
</TextBox.InnerLeftContent>
<TextBox.InnerRightContent>
<avalonia:MaterialIcon Kind="Check" Foreground="{DynamicResource SukiLowText}" Margin="5,0" Height="17" Width="17" VerticalAlignment="Center"/>
</TextBox.InnerRightContent>
</TextBox>
</showMeTheXaml:XamlDisplay>
<showMeTheXaml:XamlDisplay UniqueId="TextBox2">
<TextBox Text="" Watermark="Watermark" />
</showMeTheXaml:XamlDisplay>
Expand Down
39 changes: 23 additions & 16 deletions SukiUI/Theme/TextBoxStyles.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,13 @@

<Grid ColumnDefinitions="Auto,*,Auto">
<Panel>
<TextBlock Margin="3,1,3,0"
FontSize="14"
Foreground="{DynamicResource SukiLowText}"
Text="{TemplateBinding theme:TextBoxExtensions.Prefix}" />
<StackPanel Orientation="Horizontal">
<ContentPresenter Content="{TemplateBinding InnerLeftContent}"></ContentPresenter>
<TextBlock Margin="3,1,3,0"
FontSize="14"
Foreground="{DynamicResource SukiLowText}"
Text="{TemplateBinding theme:TextBoxExtensions.Prefix}" />
</StackPanel>
</Panel>
<ScrollViewer Grid.Column="1"
HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
Expand Down Expand Up @@ -437,20 +440,24 @@
TextWrapping="{TemplateBinding TextWrapping}" />
</Panel>
</ScrollViewer>
<theme:TextEraserButton Grid.Column="2"
Margin="5,0,0,0"
Cursor="Hand"
IsVisible="{TemplateBinding theme:TextBoxExtensions.AddDeleteButton}"
Opacity="{TemplateBinding Text,
<StackPanel Orientation="Horizontal" Grid.Column="2">
<theme:TextEraserButton
Margin="5,0,2,0"
Cursor="Hand"
IsVisible="{TemplateBinding theme:TextBoxExtensions.AddDeleteButton}"
Opacity="{TemplateBinding Text,
Converter={StaticResource StringToDoubleC}}"
Text="{TemplateBinding Text,
Text="{TemplateBinding Text,
Mode=TwoWay}">
<theme:TextEraserButton.Transitions>
<Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.35" />
</Transitions>
</theme:TextEraserButton.Transitions>
</theme:TextEraserButton>
<theme:TextEraserButton.Transitions>
<Transitions>
<DoubleTransition Property="Opacity" Duration="0:0:0.35" />
</Transitions>
</theme:TextEraserButton.Transitions>
</theme:TextEraserButton>
<ContentPresenter Content="{TemplateBinding InnerRightContent}"></ContentPresenter>
</StackPanel>


</Grid>
</DataValidationErrors>
Expand Down

0 comments on commit 1659bda

Please sign in to comment.