Browse Source

Update TextBox using search class

pull/438/head
ionite34 10 months ago
parent
commit
98cd09eb85
No known key found for this signature in database
GPG Key ID: B3404C5F3827849B
  1. 43
      StabilityMatrix.Avalonia/Views/PackageManager/PackageExtensionBrowserView.axaml

43
StabilityMatrix.Avalonia/Views/PackageManager/PackageExtensionBrowserView.axaml

@ -143,27 +143,13 @@
<sg:SpacedGrid <sg:SpacedGrid
ColumnDefinitions="*,Auto,Auto" ColumnDefinitions="*,Auto,Auto"
ColumnSpacing="8"> ColumnSpacing="8">
<TextBox Margin="4, 0,0,0" <TextBox
DataContext="{Binding AvailableItemsSearchCollection}" Classes="search"
Margin="4, 0,0,0"
Watermark="{x:Static lang:Resources.Action_Search}" Watermark="{x:Static lang:Resources.Action_Search}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{Binding Query, Mode=TwoWay}"> Text="{Binding AvailableItemsSearchCollection.Query, Mode=TwoWay}"/>
<TextBox.InnerRightContent>
<Grid>
<Button Classes="transparent-full"
IsVisible="{Binding Query, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding ClearQuery}">
<ui:SymbolIcon Symbol="Cancel" />
</Button>
<ui:SymbolIcon
IsVisible="{Binding Query, Converter={x:Static StringConverters.IsNullOrEmpty}}"
Margin="0,0,10,0"
FontSize="16"
Symbol="Find" />
</Grid>
</TextBox.InnerRightContent>
</TextBox>
<!-- Refresh Button --> <!-- Refresh Button -->
<Button <Button
@ -242,27 +228,14 @@
<sg:SpacedGrid <sg:SpacedGrid
ColumnDefinitions="*,Auto,Auto" ColumnDefinitions="*,Auto,Auto"
ColumnSpacing="8"> ColumnSpacing="8">
<TextBox Margin="4, 0,0,0" <TextBox
Classes="search"
Margin="4, 0,0,0"
DataContext="{Binding InstalledItemsSearchCollection}" DataContext="{Binding InstalledItemsSearchCollection}"
Watermark="{x:Static lang:Resources.Action_Search}" Watermark="{x:Static lang:Resources.Action_Search}"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{Binding Query, Mode=TwoWay}"> Text="{Binding Query, Mode=TwoWay}"/>
<TextBox.InnerRightContent>
<Grid>
<Button Classes="transparent-full"
IsVisible="{Binding Query, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
Command="{Binding ClearQuery}">
<ui:SymbolIcon Symbol="Cancel" />
</Button>
<ui:SymbolIcon
IsVisible="{Binding Query, Converter={x:Static StringConverters.IsNullOrEmpty}}"
Margin="0,0,10,0"
FontSize="16"
Symbol="Find" />
</Grid>
</TextBox.InnerRightContent>
</TextBox>
<!-- Refresh Button --> <!-- Refresh Button -->
<Button <Button

Loading…
Cancel
Save