Skip to content

Commit 6078607

Browse files
authored
[LottieGen] Fixed UAP version check for Drop Shadow effect (#480)
1 parent 965d744 commit 6078607

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

source/LottieToWinComp/Effects.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ public static Visual ApplyDropShadow(
109109
Visual source,
110110
DropShadowEffect dropShadowEffect)
111111
{
112+
if (!context.ObjectFactory.IsUapApiAvailable(nameof(CompositionVisualSurface), versionDependentFeatureDescription: "Drop Shadow"))
113+
{
114+
// The effect can't be displayed on the targeted version.
115+
return source;
116+
}
117+
112118
Debug.Assert(dropShadowEffect.IsEnabled, "Precondition");
113119
Debug.Assert(context is PreCompLayerContext || context is ShapeLayerContext, "Precondition");
114120

0 commit comments

Comments
 (0)