Skip to content

Commit d770b7e

Browse files
authored
Code Quality: Replaced our own Shimmer control with WCT (#16926)
1 parent 1ee3ac5 commit d770b7e

File tree

8 files changed

+15
-288
lines changed

8 files changed

+15
-288
lines changed

Directory.Packages.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<PackageVersion Include="ColorCode.WinUI" Version="2.0.15" />
99
<PackageVersion Include="CommunityToolkit.Labs.WinUI.Controls.MarkdownTextBlock" Version="0.1.250206-build.2040" />
1010
<PackageVersion Include="CommunityToolkit.Labs.WinUI.DependencyPropertyGenerator" Version="0.1.250206-build.2040" />
11+
<PackageVersion Include="CommunityToolkit.Labs.WinUI.Shimmer" Version="0.1.250206-build.2040" />
1112
<PackageVersion Include="CommunityToolkit.Mvvm" Version="8.4.0" />
1213
<PackageVersion Include="CommunityToolkit.WinUI.Behaviors" Version="8.2.250129-preview2" />
1314
<PackageVersion Include="CommunityToolkit.WinUI.Controls.ColorPicker" Version="8.2.250129-preview2" />

src/Files.App/Files.App.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
<PackageReference Include="ColorCode.WinUI" />
6767
<PackageReference Include="CommunityToolkit.Labs.WinUI.Controls.MarkdownTextBlock" />
6868
<PackageReference Include="CommunityToolkit.Labs.WinUI.DependencyPropertyGenerator" />
69+
<PackageReference Include="CommunityToolkit.Labs.WinUI.Shimmer" />
6970
<PackageReference Include="CommunityToolkit.Mvvm" />
7071
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" />
7172
<PackageReference Include="CommunityToolkit.WinUI.Controls.ColorPicker" />
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<!-- Copyright (c) Files Community. Licensed under the MIT License. -->
1+
<!-- Copyright (c) Files Community. Licensed under the MIT License. -->
22
<ResourceDictionary
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
xmlns:uc="using:Files.App.UserControls">
5+
xmlns:wctlabs="using:CommunityToolkit.Labs.WinUI">
66

7-
<Style TargetType="uc:Shimmer">
7+
<Style TargetType="wctlabs:Shimmer">
88
<Setter Property="CornerRadius" Value="4" />
99
<Setter Property="MinWidth" Value="8" />
1010
<Setter Property="MinHeight" Value="8" />
1111
<Setter Property="Template">
1212
<Setter.Value>
13-
<ControlTemplate TargetType="uc:Shimmer">
13+
<ControlTemplate TargetType="wctlabs:Shimmer">
1414
<Border
1515
x:Name="Shape"
1616
Background="{TemplateBinding Background}"
@@ -20,4 +20,4 @@
2020
</Setter>
2121
</Style>
2222

23-
</ResourceDictionary>
23+
</ResourceDictionary>

src/Files.App/UserControls/Shimmer/Shimmer.Properties.cs

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

src/Files.App/UserControls/Shimmer/Shimmer.cs

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

src/Files.App/Views/Layouts/ColumnLayoutPage.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
xmlns:uc="using:Files.App.UserControls"
1616
xmlns:wct="using:CommunityToolkit.WinUI"
1717
xmlns:wctconverters="using:CommunityToolkit.WinUI.Converters"
18+
xmlns:wctlabs="using:CommunityToolkit.Labs.WinUI"
1819
x:Name="PageRoot"
1920
HighContrastAdjustment="None"
2021
mc:Ignorable="d">
@@ -242,7 +243,7 @@
242243
</ContentPresenter>
243244

244245
<!-- Loading indicator -->
245-
<uc:Shimmer
246+
<wctlabs:Shimmer
246247
x:Name="TypeUnknownGlyph"
247248
Margin="2"
248249
x:Load="{x:Bind NeedsPlaceholderGlyph, Mode=OneWay}" />

src/Files.App/Views/Layouts/DetailsLayoutPage.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
xmlns:uc="using:Files.App.UserControls"
1919
xmlns:wct="using:CommunityToolkit.WinUI"
2020
xmlns:wctconverters="using:CommunityToolkit.WinUI.Converters"
21+
xmlns:wctlabs="using:CommunityToolkit.Labs.WinUI"
2122
x:Name="PageRoot"
2223
NavigationCacheMode="Enabled"
2324
mc:Ignorable="d">
@@ -931,7 +932,7 @@
931932
</ContentPresenter>
932933

933934
<!-- Loading indicator -->
934-
<uc:Shimmer
935+
<wctlabs:Shimmer
935936
x:Name="TypeUnknownGlyph"
936937
Margin="2"
937938
x:Load="{x:Bind NeedsPlaceholderGlyph, Mode=OneWay}" />

src/Files.App/Views/Layouts/GridLayoutPage.xaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
xmlns:uc="using:Files.App.UserControls"
1919
xmlns:wctanimations="using:CommunityToolkit.WinUI.Animations"
2020
xmlns:wctconverters="using:CommunityToolkit.WinUI.Converters"
21+
xmlns:wctlabs="using:CommunityToolkit.Labs.WinUI"
2122
x:Name="PageRoot"
2223
NavigationCacheMode="Enabled"
2324
mc:Ignorable="d">
@@ -127,7 +128,7 @@
127128
</ContentPresenter>
128129

129130
<!-- Loading indicator -->
130-
<uc:Shimmer
131+
<wctlabs:Shimmer
131132
x:Name="TypeUnknownGlyph"
132133
Margin="12"
133134
x:Load="{x:Bind NeedsPlaceholderGlyph, Mode=OneWay}" />
@@ -319,7 +320,7 @@
319320
</ContentPresenter>
320321

321322
<!-- Loading indicator -->
322-
<uc:Shimmer
323+
<wctlabs:Shimmer
323324
x:Name="TypeUnknownGlyph"
324325
Margin="2"
325326
x:Load="{x:Bind NeedsPlaceholderGlyph, Mode=OneWay}" />
@@ -467,7 +468,7 @@
467468
</ContentPresenter>
468469

469470
<!-- Loading indicator -->
470-
<uc:Shimmer
471+
<wctlabs:Shimmer
471472
x:Name="TypeUnknownGlyph"
472473
Width="{Binding ElementName=PageRoot, Path=CardsViewIconSize, Mode=OneWay}"
473474
Height="{Binding ElementName=PageRoot, Path=CardsViewIconSize, Mode=OneWay}"

0 commit comments

Comments
 (0)