Skip to content

Commit 0f3a729

Browse files
Switched to Built-in converter
1 parent 49d4003 commit 0f3a729

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

src/Files.App/Converters/BoolToGlyph.cs

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/Files.App/UserControls/SearchBox.xaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
55
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
6+
xmlns:converters="using:CommunityToolkit.WinUI.UI.Converters"
67
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7-
xmlns:converters="using:Files.App.Converters"
88
xmlns:fs="using:Files.App.Filesystem"
99
xmlns:helpers="using:Files.App.Helpers"
1010
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
@@ -14,6 +14,11 @@
1414

1515
<UserControl.Resources>
1616

17+
<converters:BoolToObjectConverter
18+
x:Key="ListedItemGlyphConverter"
19+
FalseValue="&#xE7C3;"
20+
TrueValue="&#xE81C;" />
21+
1722
<Style
1823
x:Key="TextBoxStyle"
1924
BasedOn="{StaticResource AutoSuggestBoxTextBoxStyle}"
@@ -56,10 +61,11 @@
5661
Source="{x:Bind FileImage, Mode=OneWay}"
5762
Stretch="Uniform" />
5863
</Border>
64+
<!-- "\xE81C" is the glyph for Recent Searches, "\xE7C3" is the default glyph -->
5965
<FontIcon
6066
x:Name="EmptyIconGlyph"
6167
x:Load="{x:Bind NeedsPlaceholderGlyph, Mode=OneWay}"
62-
Glyph="{x:Bind converters:RecentFilesBoolToGlyph.Convert(IsRecentSearch), Mode=OneTime}" />
68+
Glyph="{x:Bind IsRecentSearch, Mode=OneTime, Converter={StaticResource ListedItemGlyphConverter}}" />
6369
</Grid>
6470
<TextBlock VerticalAlignment="Center" Text="{x:Bind ItemName}" />
6571
</StackPanel>

0 commit comments

Comments
 (0)