Skip to content

Commit faabf75

Browse files
More renaming
Co-Authored-By: Justin Liu <[email protected]>
1 parent 84708e9 commit faabf75

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

components/Shimmer/samples/Shimmer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ issue-id: 0
1212
---
1313
# Shimmer
1414

15-
The Shimmer control can be used to communicate to the user a certain UI element is fetching data or is loading. The `AnimationDurationInMilliseconds` can be set to change the time in between fades.
15+
The Shimmer control can be used to communicate to the user a certain UI element is fetching data or is loading. The `Duration` can be set to change the time in between fades.
1616

1717
> [!SAMPLE ShimmerSample]

components/Shimmer/src/Shimmer/Shimmer.Properties.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@ public partial class Shimmer : Control
99
nameof(Duration), typeof(TimeSpan), typeof(Shimmer), new PropertyMetadata(TimeSpan.FromMilliseconds(1600), (s, e) =>
1010
{
1111
var self = (Shimmer)s;
12-
if (self.IsAnimating)
12+
if (self.IsActive)
1313
{
1414
self.TryStartAnimation();
1515
}
1616
}));
1717

18-
public static readonly DependencyProperty IsAnimatingProperty = DependencyProperty.Register(
19-
nameof(IsAnimating), typeof(bool), typeof(Shimmer), new PropertyMetadata(true, (s, e) =>
18+
public static readonly DependencyProperty IsActiveProperty = DependencyProperty.Register(
19+
nameof(IsActive), typeof(bool), typeof(Shimmer), new PropertyMetadata(true, (s, e) =>
2020
{
2121
var self = (Shimmer)s;
22-
var isAnimating = (bool)e.NewValue;
22+
var isActive = (bool)e.NewValue;
2323

24-
if (isAnimating)
24+
if (isActive)
2525
{
2626
self.TryStartAnimation();
2727
}
@@ -37,9 +37,9 @@ public TimeSpan Duration
3737
set => SetValue(DurationProperty, value);
3838
}
3939

40-
public bool IsAnimating
40+
public bool IsActive
4141
{
42-
get => (bool)GetValue(IsAnimatingProperty);
43-
set => SetValue(IsAnimatingProperty, value);
42+
get => (bool)GetValue(IsActiveProperty);
43+
set => SetValue(IsActiveProperty, value);
4444
}
4545
}

components/Shimmer/src/Shimmer/Shimmer.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,7 @@ private void OnUnloaded(object sender, RoutedEventArgs e)
8686

8787
if (_initialized && _shape != null)
8888
{
89-
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
9089
ElementCompositionPreview.SetElementChildVisual(_shape, null);
91-
#pragma warning restore CS8625 // Cannot convert null literal to non-nullable reference type.
9290

9391
_rectangleGeometry.Dispose();
9492
_shapeVisual.Dispose();

0 commit comments

Comments
 (0)