-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean-up ShadowAnimation type and add rest of animatable properties
- Loading branch information
1 parent
71322fc
commit b88e4a2
Showing
6 changed files
with
84 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
Microsoft.Toolkit.Uwp.UI.Animations/Xaml/Shadows/BlurRadiusDropShadowAnimation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using Windows.UI.Composition; | ||
|
||
namespace Microsoft.Toolkit.Uwp.UI.Animations | ||
{ | ||
/// <summary> | ||
/// A blur radius animation working on the composition layer. | ||
/// </summary> | ||
public sealed class BlurRadiusDropShadowAnimation : ShadowAnimation<double?, double> | ||
{ | ||
/// <inheritdoc/> | ||
protected override string ExplicitTarget => nameof(DropShadow.BlurRadius); | ||
|
||
/// <inheritdoc/> | ||
protected override (double?, double?) GetParsedValues() | ||
{ | ||
return (To, From); | ||
} | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
Microsoft.Toolkit.Uwp.UI.Animations/Xaml/Shadows/ColorDropShadowAnimation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using Windows.UI; | ||
using Windows.UI.Composition; | ||
|
||
#pragma warning disable CS0419 | ||
|
||
namespace Microsoft.Toolkit.Uwp.UI.Animations | ||
{ | ||
/// <summary> | ||
/// A custom <see cref="Color"/> animation on a <see cref="DropShadow"/>. | ||
/// </summary> | ||
public sealed class ColorDropShadowAnimation : ShadowAnimation<Color?, Color> | ||
{ | ||
/// <inheritdoc/> | ||
protected override string ExplicitTarget => nameof(DropShadow.Color); | ||
|
||
/// <inheritdoc/> | ||
protected override (Color?, Color?) GetParsedValues() | ||
{ | ||
return (To, From); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
Microsoft.Toolkit.Uwp.UI.Animations/Xaml/Shadows/OpacityDropShadowAnimation.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using Windows.UI.Composition; | ||
|
||
namespace Microsoft.Toolkit.Uwp.UI.Animations | ||
{ | ||
/// <summary> | ||
/// An opacity animation working on the composition layer. | ||
/// </summary> | ||
public sealed class OpacityDropShadowAnimation : ShadowAnimation<double?, double> | ||
{ | ||
/// <inheritdoc/> | ||
protected override string ExplicitTarget => nameof(DropShadow.Opacity); | ||
|
||
/// <inheritdoc/> | ||
protected override (double?, double?) GetParsedValues() | ||
{ | ||
return (To, From); | ||
} | ||
} | ||
} |