//------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// LottieGen version:
// 8.2.250604.1+b02a3ee244
//
// Command:
// LottieGen -Language CSharp -Public -WinUIVersion 3.0 -InputFile ThumbsUpAnimatedIcon.json
//
// Input file:
// ThumbsUpAnimatedIcon.json (8970 bytes created 16:36+02:00 Apr 20 2026)
//
// LottieGen source:
// http://aka.ms/Lottie
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
// ____________________________________
// | Object stats | Count |
// |__________________________|_______|
// | All CompositionObjects | 114 |
// |--------------------------+-------|
// | Expression animators | 3 |
// | KeyFrame animators | 12 |
// | Reference parameters | 3 |
// | Expression operations | 4 |
// |--------------------------+-------|
// | Animated brushes | - |
// | Animated gradient stops | - |
// | ExpressionAnimations | 3 |
// | PathKeyFrameAnimations | - |
// |--------------------------+-------|
// | ContainerVisuals | 22 |
// | ShapeVisuals | 4 |
// |--------------------------+-------|
// | ContainerShapes | - |
// | CompositionSpriteShapes | 4 |
// |--------------------------+-------|
// | Brushes | 2 |
// | Gradient stops | - |
// | CompositionVisualSurface | - |
// ------------------------------------
using Microsoft.Graphics;
using Microsoft.Graphics.Canvas.Geometry;
using Microsoft.UI.Composition;
using Microsoft.UI.Xaml.Controls;
using System;
using System.Collections.Generic;
using System.Numerics;
using Windows.UI;
namespace ProtonVPN.Client.Common.UI.Assets.Animations
{
// Frame rate: 60 fps
// Frame count: 60
// Duration: 1000.0 mS
public class ThumbsUpAnimatedIcon
: IAnimatedVisualSource
, IAnimatedVisualSource2
{
// Animation duration: 1.000 seconds.
internal const long c_durationTicks = 10000000;
Color _foregroundColor = Color.FromArgb(0xFF, 0xFF, 0xFF, 0xFF);
Color _accentColor = Color.FromArgb(0xFF, 0xFF, 0xB8, 0x4D);
ThumbsUpAnimatedIcon_AnimatedVisual _animatedVisual;
public IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor)
{
object ignored = null;
return TryCreateAnimatedVisual(compositor, out ignored);
}
public IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor, out object diagnostics)
{
diagnostics = null;
var res =
new ThumbsUpAnimatedIcon_AnimatedVisual(
compositor,
_foregroundColor,
_accentColor);
res.CreateAnimations();
_animatedVisual = res;
return res;
}
///
/// Gets the number of frames in the animation.
///
public double FrameCount => 60d;
///
/// Gets the frame rate of the animation.
///
public double Framerate => 60d;
///
/// Gets the duration of the animation.
///
public TimeSpan Duration => TimeSpan.FromTicks(10000000);
///
/// Converts a zero-based frame number to the corresponding progress value denoting the
/// start of the frame.
///
public double FrameToProgress(double frameNumber)
{
return frameNumber / 60d;
}
///
/// Returns a map from marker names to corresponding progress values.
///
public IReadOnlyDictionary Markers { get; } =
new Dictionary
{
// Play animation only when moving from PointerOver to Pressed
{ "PointerOverToPressed_Start", 0.00 },
{ "PointerOverToPressed_End", 1.00 },
// No animation for other state transitions
{ "PointerOverToNormal_Start", 0.00 },
{ "PointerOverToNormal_End", 0.00 },
{ "PressedToNormal_Start", 0.00 },
{ "PressedToNormal_End", 0.00 },
{ "PressedToPointerOver_Start", 0.00 },
{ "PressedToPointerOver_End", 0.00 },
{ "NormalToPressed_Start", 0.00 },
{ "NormalToPressed_End", 0.00 },
{ "NormalToPointerOver_Start", 0.00 },
{ "NormalToPointerOver_End", 0.00 },
};
///
/// Sets the color property with the given name, or does nothing if no such property
/// exists.
///
public void SetColorProperty(string propertyName, Color value)
{
if (propertyName == "Foreground")
{
_foregroundColor = value;
_animatedVisual?.UpdateForegroundColor(value);
}
}
///
/// Sets the scalar property with the given name, or does nothing if no such property
/// exists.
///
public void SetScalarProperty(string propertyName, double value)
{ }
sealed class ThumbsUpAnimatedIcon_AnimatedVisual
: IAnimatedVisual
, IAnimatedVisual2
{
const long c_durationTicks = 10000000;
readonly Compositor _c;
readonly ExpressionAnimation _reusableExpressionAnimation;
AnimationController _animationController_0;
CanvasGeometry _geometry_2;
CanvasGeometry _geometry_3;
CompositionColorBrush _accentColorBrush;
CompositionColorBrush _foregroundColorBrush;
CompositionPathGeometry _pathGeometry_2;
ContainerVisual _containerVisual_00;
ContainerVisual _containerVisual_02;
ContainerVisual _containerVisual_05;
ContainerVisual _containerVisual_07;
ContainerVisual _containerVisual_10;
ContainerVisual _containerVisual_12;
ContainerVisual _containerVisual_15;
ContainerVisual _containerVisual_17;
ContainerVisual _root;
CubicBezierEasingFunction _cubicBezierEasingFunction_0;
CubicBezierEasingFunction _cubicBezierEasingFunction_1;
InsetClip _insetClip_0;
ScalarKeyFrameAnimation _rotationAngleInDegreesScalarAnimation_0_to_0;
StepEasingFunction _holdThenStepEasingFunction;
void BindProperty(
CompositionObject target,
string animatedPropertyName,
string expression,
string referenceParameterName,
CompositionObject referencedObject)
{
_reusableExpressionAnimation.ClearAllParameters();
_reusableExpressionAnimation.Expression = expression;
_reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
}
ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
{
var result = _c.CreateScalarKeyFrameAnimation();
result.Duration = TimeSpan.FromTicks(c_durationTicks);
result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
return result;
}
Vector3KeyFrameAnimation CreateVector3KeyFrameAnimation(float initialProgress, Vector3 initialValue, CompositionEasingFunction initialEasingFunction)
{
var result = _c.CreateVector3KeyFrameAnimation();
result.Duration = TimeSpan.FromTicks(c_durationTicks);
result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
return result;
}
CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, Matrix3x2 transformMatrix, CompositionBrush fillBrush)
{
var result = _c.CreateSpriteShape(geometry);
result.TransformMatrix = transformMatrix;
result.FillBrush = fillBrush;
return result;
}
AnimationController AnimationController_0()
{
if (_animationController_0 != null)
{ return _animationController_0; }
var result = _animationController_0 = _c.CreateAnimationController();
result.Pause();
BindProperty(_animationController_0, "Progress", "_.Progress", "_", _root);
return result;
}
// - - - - - - - - PreComp layer:
// - - - - - - - Transforms for Scale(1,1,0)
// - - - - - - Transforms for
// - - - - PreComp layer:
// - - - Layer aggregator
// - - Scale:1.3333,1.3333
// - ++.PathGeometry
CanvasGeometry Geometry_0()
{
var result = CanvasGeometry.CreateGroup(
null,
new CanvasGeometry[] { Geometry_1(), Geometry_2(), Geometry_3() },
CanvasFilledRegionDetermination.Alternate);
return result;
}
// - - - - - - - - - PreComp layer:
// - - - - - - - - Transforms for Scale(1,1,0)
// - - - - - - - Transforms for
// - - - - - PreComp layer:
// - - - - Layer aggregator
// - - - Scale:1.3333,1.3333
// - - ++.PathGeometry
CanvasGeometry Geometry_1()
{
CanvasGeometry result;
using (var builder = new CanvasPathBuilder(null))
{
builder.BeginFigure(new Vector2(6.94000006F, 1.5F));
builder.AddCubicBezier(new Vector2(6.78999996F, 1.5F), new Vector2(6.65999985F, 1.61000001F), new Vector2(6.63000011F, 1.75F));
builder.AddLine(new Vector2(6.38999987F, 2.95000005F));
builder.AddCubicBezier(new Vector2(6.36000013F, 3.07999992F), new Vector2(6.32000017F, 3.19000006F), new Vector2(6.25F, 3.29999995F));
builder.AddLine(new Vector2(5.19999981F, 5.07000017F));
builder.AddLine(new Vector2(5.15999985F, 5.13000011F));
builder.AddLine(new Vector2(5.0999999F, 5.17999983F));
builder.AddLine(new Vector2(3.75F, 6.19000006F));
builder.AddLine(new Vector2(3.75F, 8.40999985F));
builder.AddLine(new Vector2(6.01000023F, 9.69999981F));
builder.AddCubicBezier(new Vector2(6.07000017F, 9.73999977F), new Vector2(6.13000011F, 9.75F), new Vector2(6.19999981F, 9.75F));
builder.AddLine(new Vector2(8.85000038F, 9.75F));
builder.AddCubicBezier(new Vector2(9.01000023F, 9.75F), new Vector2(9.14999962F, 9.64999962F), new Vector2(9.19999981F, 9.5F));
builder.AddLine(new Vector2(10.54F, 5.75F));
builder.AddCubicBezier(new Vector2(10.6300001F, 5.51000023F), new Vector2(10.4499998F, 5.25F), new Vector2(10.1899996F, 5.25F));
builder.AddLine(new Vector2(8.25F, 5.25F));
builder.AddCubicBezier(new Vector2(8.06999969F, 5.25F), new Vector2(7.92000008F, 5.13000011F), new Vector2(7.88000011F, 4.94999981F));
builder.AddLine(new Vector2(7.23999977F, 1.75F));
builder.AddCubicBezier(new Vector2(7.21000004F, 1.61000001F), new Vector2(7.09000015F, 1.5F), new Vector2(6.94000006F, 1.5F));
builder.EndFigure(CanvasFigureLoop.Closed);
result = CanvasGeometry.CreatePath(builder);
}
return result;
}
CanvasGeometry Geometry_2()
{
CanvasGeometry result;
using (var builder = new CanvasPathBuilder(null))
{
builder.BeginFigure(new Vector2(1.5F, 9.75F));
builder.AddLine(new Vector2(2.63000011F, 9.75F));
builder.AddCubicBezier(new Vector2(2.83999991F, 9.75F), new Vector2(3F, 9.59000015F), new Vector2(3F, 9.38000011F));
builder.AddLine(new Vector2(3F, 4.88000011F));
builder.AddCubicBezier(new Vector2(3F, 4.67000008F), new Vector2(2.83999991F, 4.5F), new Vector2(2.63000011F, 4.5F));
builder.AddLine(new Vector2(1.5F, 4.5F));
builder.AddLine(new Vector2(1.5F, 9.75F));
builder.EndFigure(CanvasFigureLoop.Closed);
result = _geometry_2 = CanvasGeometry.CreatePath(builder);
}
return result;
}
CanvasGeometry Geometry_3()
{
CanvasGeometry result;
using (var builder = new CanvasPathBuilder(null))
{
builder.BeginFigure(new Vector2(6.94000006F, 0.75F));
builder.AddCubicBezier(new Vector2(7.44000006F, 0.75F), new Vector2(7.88000011F, 1.10000002F), new Vector2(7.98000002F, 1.60000002F));
builder.AddLine(new Vector2(8.56000042F, 4.5F));
builder.AddLine(new Vector2(10.1899996F, 4.5F));
builder.AddCubicBezier(new Vector2(10.9700003F, 4.5F), new Vector2(11.5100002F, 5.26999998F), new Vector2(11.25F, 6F));
builder.AddLine(new Vector2(9.90999985F, 9.75F));
builder.AddCubicBezier(new Vector2(9.75F, 10.1999998F), new Vector2(9.31999969F, 10.5F), new Vector2(8.85000038F, 10.5F));
builder.AddLine(new Vector2(6.19999981F, 10.5F));
builder.AddCubicBezier(new Vector2(6F, 10.5F), new Vector2(5.80999994F, 10.4499998F), new Vector2(5.63999987F, 10.3500004F));
builder.AddLine(new Vector2(3.75F, 9.27000046F));
builder.AddLine(new Vector2(3.75F, 9.38000011F));
builder.AddCubicBezier(new Vector2(3.75F, 10F), new Vector2(3.25F, 10.5F), new Vector2(2.63000011F, 10.5F));
builder.AddLine(new Vector2(0.75F, 10.5F));
builder.AddLine(new Vector2(0.75F, 3.75F));
builder.AddLine(new Vector2(2.63000011F, 3.75F));
builder.AddCubicBezier(new Vector2(3.25F, 3.75F), new Vector2(3.75F, 4.26000023F), new Vector2(3.75F, 4.88000011F));
builder.AddLine(new Vector2(3.75F, 5.25F));
builder.AddLine(new Vector2(4.59000015F, 4.61999989F));
builder.AddLine(new Vector2(5.61000013F, 2.92000008F));
builder.AddCubicBezier(new Vector2(5.63000011F, 2.88000011F), new Vector2(5.6500001F, 2.83999991F), new Vector2(5.65999985F, 2.79999995F));
builder.AddLine(new Vector2(5.9000001F, 1.60000002F));
builder.AddCubicBezier(new Vector2(6F, 1.10000002F), new Vector2(6.44000006F, 0.75F), new Vector2(6.94000006F, 0.75F));
builder.EndFigure(CanvasFigureLoop.Closed);
result = _geometry_3 = CanvasGeometry.CreatePath(builder);
}
return result;
}
// - - - - - - - - PreComp layer:
// - - - - - - - Transforms for Scale(1,1,0)
// - - - - - - Transforms for
// - - - - PreComp layer:
// - - - Layer aggregator
// - - Scale:1.3333,1.3333
// - +.PathGeometry
CanvasGeometry Geometry_4()
{
var result = CanvasGeometry.CreateGroup(
null,
new CanvasGeometry[] { Geometry_2(), Geometry_3() },
CanvasFilledRegionDetermination.Alternate);
return result;
}
CanvasGeometry Geometry_5()
{
CanvasGeometry result;
using (var builder = new CanvasPathBuilder(null))
{
builder.BeginFigure(new Vector2(2.1400001F, 3.56999993F));
builder.AddLine(new Vector2(2.47000003F, 2.73000002F));
builder.AddCubicBezier(new Vector2(2.51999998F, 2.6099999F), new Vector2(2.6099999F, 2.51999998F), new Vector2(2.73000002F, 2.47000003F));
builder.AddLine(new Vector2(3.56999993F, 2.1400001F));
builder.AddCubicBezier(new Vector2(3.79999995F, 2.04999995F), new Vector2(3.79999995F, 1.70000005F), new Vector2(3.56999993F, 1.61000001F));
builder.AddLine(new Vector2(2.73000002F, 1.27999997F));
builder.AddCubicBezier(new Vector2(2.6099999F, 1.23000002F), new Vector2(2.51999998F, 1.13999999F), new Vector2(2.47000003F, 1.01999998F));
builder.AddLine(new Vector2(2.1400001F, 0.180000007F));
builder.AddCubicBezier(new Vector2(2.04999995F, -0.0500000007F), new Vector2(1.70000005F, -0.0500000007F), new Vector2(1.61000001F, 0.180000007F));
builder.AddLine(new Vector2(1.27999997F, 1.01999998F));
builder.AddCubicBezier(new Vector2(1.23000002F, 1.13999999F), new Vector2(1.13999999F, 1.23000002F), new Vector2(1.01999998F, 1.27999997F));
builder.AddLine(new Vector2(0.180000007F, 1.61000001F));
builder.AddCubicBezier(new Vector2(-0.0500000007F, 1.70000005F), new Vector2(-0.0500000007F, 2.04999995F), new Vector2(0.180000007F, 2.1400001F));
builder.AddLine(new Vector2(1.01999998F, 2.47000003F));
builder.AddCubicBezier(new Vector2(1.13999999F, 2.51999998F), new Vector2(1.23000002F, 2.6099999F), new Vector2(1.27999997F, 2.73000002F));
builder.AddLine(new Vector2(1.61000001F, 3.56999993F));
builder.AddCubicBezier(new Vector2(1.70000005F, 3.79999995F), new Vector2(2.04999995F, 3.79999995F), new Vector2(2.1400001F, 3.56999993F));
builder.EndFigure(CanvasFigureLoop.Closed);
result = CanvasGeometry.CreatePath(builder);
}
return result;
}
CompositionColorBrush AccentColorBrush()
{
return (_accentColorBrush == null)
? _accentColorBrush = _c.CreateColorBrush(_accentColor)
: _accentColorBrush;
}
CompositionColorBrush ForegroundColorBrush()
{
return (_foregroundColorBrush == null)
? _foregroundColorBrush = _c.CreateColorBrush(_foregroundColor)
: _foregroundColorBrush;
}
// - - - - - - PreComp layer:
// - - - - - Transforms for Scale(1,1,0)
// - - - - Transforms for
// - - PreComp layer:
// - Layer aggregator
// Scale:1.3333,1.3333
// ++.PathGeometry
CompositionPathGeometry PathGeometry_0()
{
return _c.CreatePathGeometry(new CompositionPath(Geometry_0()));
}
// - - - - - - PreComp layer:
// - - - - - Transforms for Scale(1,1,0)
// - - - - Transforms for
// - - PreComp layer:
// - Layer aggregator
// Scale:1.3333,1.3333
// +.PathGeometry
CompositionPathGeometry PathGeometry_1()
{
return _c.CreatePathGeometry(new CompositionPath(Geometry_4()));
}
CompositionPathGeometry PathGeometry_2()
{
return (_pathGeometry_2 == null)
? _pathGeometry_2 = _c.CreatePathGeometry(new CompositionPath(Geometry_5()))
: _pathGeometry_2;
}
// - - - - - PreComp layer:
// - - - - Transforms for Scale(1,1,0)
// - - - Transforms for
// - PreComp layer:
// Layer aggregator
// ++
CompositionSpriteShape SpriteShape_0()
{
// Scale:<1.3333, 1.3333>
var geometry = PathGeometry_0();
var result = CreateSpriteShape(geometry, new Matrix3x2(1.33329999F, 0F, 0F, 1.33329999F, 0F, 0F), ForegroundColorBrush());
;
return result;
}
// - - - - - PreComp layer:
// - - - - Transforms for Scale(1,1,0)
// - - - Transforms for
// - PreComp layer:
// Layer aggregator
// +
CompositionSpriteShape SpriteShape_1()
{
// Scale:<1.3333, 1.3333>
var geometry = PathGeometry_1();
var result = CreateSpriteShape(geometry, new Matrix3x2(1.33329999F, 0F, 0F, 1.33329999F, 0F, 0F), ForegroundColorBrush());
;
return result;
}
// - - - Transforms for
// - PreComp layer:
// Layer aggregator
// ShapeGroup:
CompositionSpriteShape SpriteShape_2()
{
// Scale:<1.3333, 1.3333>
var geometry = PathGeometry_2();
var result = CreateSpriteShape(geometry, new Matrix3x2(1.33329999F, 0F, 0F, 1.33329999F, 0F, 0F), AccentColorBrush());
;
return result;
}
// - - - - Transforms for
// - - PreComp layer:
// - Transforms for Scale(1,1,0)
// Layer aggregator
// ShapeGroup:
CompositionSpriteShape SpriteShape_3()
{
// Scale:<1.3333, 1.3333>
var geometry = PathGeometry_2();
var result = CreateSpriteShape(geometry, new Matrix3x2(1.33329999F, 0F, 0F, 1.33329999F, 0F, 0F), AccentColorBrush());
;
return result;
}
// Opacity for layer:
ContainerVisual ContainerVisual_00()
{
if (_containerVisual_00 != null)
{ return _containerVisual_00; }
var result = _containerVisual_00 = _c.CreateContainerVisual();
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Transforms for Scale(1,1,0)
result.Children.InsertAtTop(ContainerVisual_01());
return result;
}
// PreComp layer:
// Transforms for Scale(1,1,0)
ContainerVisual ContainerVisual_01()
{
var result = _c.CreateContainerVisual();
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Transforms for
result.Children.InsertAtTop(ContainerVisual_02());
return result;
}
// - PreComp layer:
// Transforms for Scale(1,1,0)
// Transforms for
ContainerVisual ContainerVisual_02()
{
if (_containerVisual_02 != null)
{ return _containerVisual_02; }
var result = _containerVisual_02 = _c.CreateContainerVisual();
result.CenterPoint = new Vector3(8F, 8F, 0F);
result.Offset = new Vector3(6F, 6F, 0F);
result.Scale = new Vector3(1F, 1F, 0F);
result.Children.InsertAtTop(ContainerVisual_03());
return result;
}
// - - PreComp layer:
// - Transforms for Scale(1,1,0)
// Transforms for
ContainerVisual ContainerVisual_03()
{
var result = _c.CreateContainerVisual();
result.Clip = InsetClip_0();
result.Size = new Vector2(16F, 16F);
// PreComp layer:
result.Children.InsertAtTop(ContainerVisual_04());
return result;
}
// - - - PreComp layer:
// - - Transforms for Scale(1,1,0)
// - Transforms for
// Transforms for Scale(1,1,0)
ContainerVisual ContainerVisual_04()
{
var result = _c.CreateContainerVisual();
result.Clip = InsetClip_0();
result.Size = new Vector2(16F, 16F);
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Layer aggregator
result.Children.InsertAtTop(ShapeVisual_0());
return result;
}
// Opacity for layer:
ContainerVisual ContainerVisual_05()
{
if (_containerVisual_05 != null)
{ return _containerVisual_05; }
var result = _containerVisual_05 = _c.CreateContainerVisual();
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Transforms for Scale(1,1,0)
result.Children.InsertAtTop(ContainerVisual_06());
return result;
}
// PreComp layer:
// Transforms for Scale(1,1,0)
ContainerVisual ContainerVisual_06()
{
var result = _c.CreateContainerVisual();
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Transforms for
result.Children.InsertAtTop(ContainerVisual_07());
return result;
}
// - PreComp layer:
// Transforms for Scale(1,1,0)
// Transforms for
ContainerVisual ContainerVisual_07()
{
if (_containerVisual_07 != null)
{ return _containerVisual_07; }
var result = _containerVisual_07 = _c.CreateContainerVisual();
result.CenterPoint = new Vector3(8F, 8F, 0F);
result.Offset = new Vector3(6F, 6F, 0F);
result.Scale = new Vector3(1F, 1F, 0F);
result.Children.InsertAtTop(ContainerVisual_08());
return result;
}
// - - PreComp layer:
// - Transforms for Scale(1,1,0)
// Transforms for
ContainerVisual ContainerVisual_08()
{
var result = _c.CreateContainerVisual();
result.Clip = InsetClip_0();
result.Size = new Vector2(16F, 16F);
// PreComp layer:
result.Children.InsertAtTop(ContainerVisual_09());
return result;
}
// - - - PreComp layer:
// - - Transforms for Scale(1,1,0)
// - Transforms for
// Transforms for Scale(1,1,0)
ContainerVisual ContainerVisual_09()
{
var result = _c.CreateContainerVisual();
result.Clip = InsetClip_0();
result.Size = new Vector2(16F, 16F);
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Layer aggregator
result.Children.InsertAtTop(ShapeVisual_1());
return result;
}
// Opacity for layer:
ContainerVisual ContainerVisual_10()
{
if (_containerVisual_10 != null)
{ return _containerVisual_10; }
var result = _containerVisual_10 = _c.CreateContainerVisual();
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Transforms for Scale(1,1,0)
result.Children.InsertAtTop(ContainerVisual_11());
return result;
}
// PreComp layer:
// Transforms for Scale(1,1,0)
ContainerVisual ContainerVisual_11()
{
var result = _c.CreateContainerVisual();
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Transforms for
result.Children.InsertAtTop(ContainerVisual_12());
return result;
}
// Transforms for
ContainerVisual ContainerVisual_12()
{
if (_containerVisual_12 != null)
{ return _containerVisual_12; }
var result = _containerVisual_12 = _c.CreateContainerVisual();
var propertySet = result.Properties;
propertySet.InsertVector2("Position", new Vector2(9.5F, 14.5F));
result.CenterPoint = new Vector3(2.5F, 2.5F, 0F);
result.Children.InsertAtTop(ContainerVisual_13());
BindProperty(_containerVisual_12, "Offset", "Vector3(my.Position.X-2.5,my.Position.Y-2.5,0)", "my", _containerVisual_12);
return result;
}
// Transforms for
ContainerVisual ContainerVisual_13()
{
var result = _c.CreateContainerVisual();
result.Clip = InsetClip_0();
result.Size = new Vector2(5F, 5F);
// PreComp layer:
result.Children.InsertAtTop(ContainerVisual_14());
return result;
}
// - Transforms for
// Transforms for Scale(1,1,0)
ContainerVisual ContainerVisual_14()
{
var result = _c.CreateContainerVisual();
result.Clip = InsetClip_0();
result.Size = new Vector2(5F, 5F);
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Layer aggregator
result.Children.InsertAtTop(ShapeVisual_2());
return result;
}
// Opacity for layer:
ContainerVisual ContainerVisual_15()
{
if (_containerVisual_15 != null)
{ return _containerVisual_15; }
var result = _containerVisual_15 = _c.CreateContainerVisual();
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Transforms for Scale(1,1,0)
result.Children.InsertAtTop(ContainerVisual_16());
return result;
}
// PreComp layer:
// Transforms for Scale(1,1,0)
ContainerVisual ContainerVisual_16()
{
var result = _c.CreateContainerVisual();
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Transforms for
result.Children.InsertAtTop(ContainerVisual_17());
return result;
}
// Transforms for
ContainerVisual ContainerVisual_17()
{
if (_containerVisual_17 != null)
{ return _containerVisual_17; }
var result = _containerVisual_17 = _c.CreateContainerVisual();
var propertySet = result.Properties;
propertySet.InsertVector2("Position", new Vector2(22.5F, 11.5F));
result.CenterPoint = new Vector3(3.5F, 3.5F, 0F);
result.Children.InsertAtTop(ContainerVisual_18());
BindProperty(_containerVisual_17, "Offset", "Vector3(my.Position.X-3.5,my.Position.Y-3.5,0)", "my", _containerVisual_17);
return result;
}
// Transforms for
ContainerVisual ContainerVisual_18()
{
var result = _c.CreateContainerVisual();
result.Clip = InsetClip_0();
result.Size = new Vector2(7F, 7F);
// PreComp layer:
result.Children.InsertAtTop(ContainerVisual_19());
return result;
}
// - Transforms for
// Transforms for Scale(1.4,1.4,0)
ContainerVisual ContainerVisual_19()
{
var result = _c.CreateContainerVisual();
// Scale:<1.4, 1.4>
result.TransformMatrix = new Matrix4x4(1.39999998F, 0F, 0F, 0F, 0F, 1.39999998F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Transforms for Scale(1,1,0)
result.Children.InsertAtTop(ContainerVisual_20());
return result;
}
// - - Transforms for
// PreComp layer:
// Transforms for Scale(1,1,0)
ContainerVisual ContainerVisual_20()
{
var result = _c.CreateContainerVisual();
result.Clip = InsetClip_0();
result.Size = new Vector2(5F, 5F);
// Scale:<1, 1>
result.TransformMatrix = new Matrix4x4(1F, 0F, 0F, 0F, 0F, 1F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 0F, 1F);
// Layer aggregator
result.Children.InsertAtTop(ShapeVisual_3());
return result;
}
// The root of the composition.
ContainerVisual Root()
{
if (_root != null)
{ return _root; }
var result = _root = _c.CreateContainerVisual();
var propertySet = result.Properties;
propertySet.InsertScalar("Progress", 0F);
var children = result.Children;
// PreComp layer:
children.InsertAtTop(ContainerVisual_00());
// PreComp layer:
children.InsertAtTop(ContainerVisual_05());
// PreComp layer:
children.InsertAtTop(ContainerVisual_10());
// PreComp layer:
children.InsertAtTop(ContainerVisual_15());
return result;
}
CubicBezierEasingFunction CubicBezierEasingFunction_0()
{
return (_cubicBezierEasingFunction_0 == null)
? _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction(new Vector2(0F, 0F), new Vector2(1F, 1F))
: _cubicBezierEasingFunction_0;
}
CubicBezierEasingFunction CubicBezierEasingFunction_1()
{
return (_cubicBezierEasingFunction_1 == null)
? _cubicBezierEasingFunction_1 = _c.CreateCubicBezierEasingFunction(new Vector2(0.5F, 0F), new Vector2(0F, 1F))
: _cubicBezierEasingFunction_1;
}
InsetClip InsetClip_0()
{
if (_insetClip_0 != null)
{ return _insetClip_0; }
var result = _insetClip_0 = _c.CreateInsetClip();
return result;
}
// PreComp layer:
// Layer opacity animation
ScalarKeyFrameAnimation OpacityScalarAnimation_0_to_1_0()
{
// Frame 0.
var result = CreateScalarKeyFrameAnimation(0F, 0F, HoldThenStepEasingFunction());
// Frame 19.2.
result.InsertKeyFrame(0.319999993F, 0F, HoldThenStepEasingFunction());
// Frame 25.2.
result.InsertKeyFrame(0.419999987F, 1F, CubicBezierEasingFunction_0());
return result;
}
// PreComp layer:
// Layer opacity animation
ScalarKeyFrameAnimation OpacityScalarAnimation_0_to_1_1()
{
// Frame 0.
var result = CreateScalarKeyFrameAnimation(0F, 0F, HoldThenStepEasingFunction());
// Frame 13.8.
result.InsertKeyFrame(0.230000004F, 0F, HoldThenStepEasingFunction());
// Frame 43.8.
result.InsertKeyFrame(0.730000019F, 1F, CubicBezierEasingFunction_0());
return result;
}
// PreComp layer:
// Layer opacity animation
ScalarKeyFrameAnimation OpacityScalarAnimation_0_to_1_2()
{
// Frame 0.
var result = CreateScalarKeyFrameAnimation(0F, 0F, HoldThenStepEasingFunction());
// Frame 24.
result.InsertKeyFrame(0.400000006F, 0F, HoldThenStepEasingFunction());
// Frame 48.
result.InsertKeyFrame(0.800000012F, 1F, CubicBezierEasingFunction_0());
return result;
}
// PreComp layer:
// Layer opacity animation
ScalarKeyFrameAnimation OpacityScalarAnimation_1_to_0()
{
// Frame 0.
var result = CreateScalarKeyFrameAnimation(0F, 1F, HoldThenStepEasingFunction());
// Frame 19.2.
result.InsertKeyFrame(0.319999993F, 1F, HoldThenStepEasingFunction());
// Frame 25.2.
result.InsertKeyFrame(0.419999987F, 0F, CubicBezierEasingFunction_0());
return result;
}
// - Transforms for
// Position.Y
ScalarKeyFrameAnimation PositionYScalarAnimation_11p5_to_3p5()
{
// Frame 0.
var result = CreateScalarKeyFrameAnimation(0F, 11.5F, HoldThenStepEasingFunction());
// Frame 24.
result.InsertKeyFrame(0.400000006F, 11.5F, CubicBezierEasingFunction_0());
// Frame 48.
result.InsertKeyFrame(0.800000012F, 3.5F, CubicBezierEasingFunction_1());
return result;
}
// - Transforms for
// Position.Y
ScalarKeyFrameAnimation PositionYScalarAnimation_14p5_to_6p5()
{
// Frame 0.
var result = CreateScalarKeyFrameAnimation(0F, 14.5F, HoldThenStepEasingFunction());
// Frame 13.8.
result.InsertKeyFrame(0.230000004F, 14.5F, CubicBezierEasingFunction_0());
// Frame 43.8.
result.InsertKeyFrame(0.730000019F, 6.5F, CubicBezierEasingFunction_1());
return result;
}
// Rotation
ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_0_to_0()
{
// Frame 0.
if (_rotationAngleInDegreesScalarAnimation_0_to_0 != null)
{ return _rotationAngleInDegreesScalarAnimation_0_to_0; }
var result = _rotationAngleInDegreesScalarAnimation_0_to_0 = CreateScalarKeyFrameAnimation(0F, 0F, HoldThenStepEasingFunction());
// Frame 12.
result.InsertKeyFrame(0.200000003F, -25F, _c.CreateCubicBezierEasingFunction(new Vector2(0F, 0F), new Vector2(0F, 1F)));
// Frame 18.
result.InsertKeyFrame(0.300000012F, -25F, HoldThenStepEasingFunction());
// Frame 25.5.
result.InsertKeyFrame(0.425000012F, 5F, _c.CreateCubicBezierEasingFunction(new Vector2(0F, 0F), new Vector2(0.200000003F, 1F)));
// Frame 48.
result.InsertKeyFrame(0.800000012F, 0F, _c.CreateCubicBezierEasingFunction(new Vector2(0.200000003F, 0F), new Vector2(0.25F, 1F)));
return result;
}
// Transforms for
// Rotation
ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_0_to_180()
{
// Frame 0.
var result = CreateScalarKeyFrameAnimation(0F, 0F, HoldThenStepEasingFunction());
// Frame 24.
result.InsertKeyFrame(0.400000006F, 0F, HoldThenStepEasingFunction());
// Frame 48.
result.InsertKeyFrame(0.800000012F, 180F, CubicBezierEasingFunction_1());
return result;
}
// Transforms for
// Rotation
ScalarKeyFrameAnimation RotationAngleInDegreesScalarAnimation_0_to_m180()
{
// Frame 0.
var result = CreateScalarKeyFrameAnimation(0F, 0F, HoldThenStepEasingFunction());
// Frame 13.8.
result.InsertKeyFrame(0.230000004F, 0F, HoldThenStepEasingFunction());
// Frame 43.8.
result.InsertKeyFrame(0.730000019F, -180F, CubicBezierEasingFunction_1());
return result;
}
// - - - - PreComp layer:
// - - - Transforms for Scale(1,1,0)
// - - Transforms for
// PreComp layer:
// Layer aggregator
ShapeVisual ShapeVisual_0()
{
var result = _c.CreateShapeVisual();
result.Size = new Vector2(16F, 16F);
// Scale:1.3333,1.3333
result.Shapes.Add(SpriteShape_0());
return result;
}
// - - - - PreComp layer:
// - - - Transforms for Scale(1,1,0)
// - - Transforms for
// PreComp layer:
// Layer aggregator
ShapeVisual ShapeVisual_1()
{
var result = _c.CreateShapeVisual();
result.Size = new Vector2(16F, 16F);
// Scale:1.3333,1.3333
result.Shapes.Add(SpriteShape_1());
return result;
}
// - - Transforms for
// PreComp layer:
// Layer aggregator
ShapeVisual ShapeVisual_2()
{
var result = _c.CreateShapeVisual();
result.Size = new Vector2(5F, 5F);
// Scale:1.3333,1.3333
result.Shapes.Add(SpriteShape_2());
return result;
}
// - - - Transforms for
// - PreComp layer:
// Transforms for Scale(1,1,0)
// Layer aggregator
ShapeVisual ShapeVisual_3()
{
var result = _c.CreateShapeVisual();
result.Size = new Vector2(5F, 5F);
// Scale:1.3333,1.3333
result.Shapes.Add(SpriteShape_3());
return result;
}
StepEasingFunction HoldThenStepEasingFunction()
{
if (_holdThenStepEasingFunction != null)
{ return _holdThenStepEasingFunction; }
var result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
result.IsFinalStepSingleFrame = true;
return result;
}
// Transforms for
// Scale
Vector3KeyFrameAnimation ScaleVector3Animation_0()
{
// Frame 0.
var result = CreateVector3KeyFrameAnimation(0F, new Vector3(0F, 0F, 0F), HoldThenStepEasingFunction());
// Frame 13.8.
result.InsertKeyFrame(0.230000004F, new Vector3(0F, 0F, 0F), CubicBezierEasingFunction_0());
// Frame 43.8.
result.InsertKeyFrame(0.730000019F, new Vector3(1F, 1F, 0F), CubicBezierEasingFunction_1());
return result;
}
// Transforms for
// Scale
Vector3KeyFrameAnimation ScaleVector3Animation_1()
{
// Frame 0.
var result = CreateVector3KeyFrameAnimation(0F, new Vector3(0F, 0F, 0F), HoldThenStepEasingFunction());
// Frame 24.
result.InsertKeyFrame(0.400000006F, new Vector3(0F, 0F, 0F), CubicBezierEasingFunction_0());
// Frame 48.
result.InsertKeyFrame(0.800000012F, new Vector3(1F, 1F, 0F), CubicBezierEasingFunction_1());
return result;
}
Color _foregroundColor;
Color _accentColor;
internal ThumbsUpAnimatedIcon_AnimatedVisual(
Compositor compositor,
Color foregroundColor,
Color accentColor)
{
_c = compositor;
_reusableExpressionAnimation = compositor.CreateExpressionAnimation();
_foregroundColor = foregroundColor;
_accentColor = accentColor;
Root();
}
internal void UpdateForegroundColor(Color color)
{
_foregroundColor = color;
if (_foregroundColorBrush != null)
{
_foregroundColorBrush.Color = color;
}
}
public Visual RootVisual => _root;
public TimeSpan Duration => TimeSpan.FromTicks(c_durationTicks);
public Vector2 Size => new Vector2(28F, 28F);
void IDisposable.Dispose() => _root?.Dispose();
public void CreateAnimations()
{
_containerVisual_00.StartAnimation("Opacity", OpacityScalarAnimation_1_to_0(), AnimationController_0());
_containerVisual_02.StartAnimation("RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_0_to_0(), AnimationController_0());
_containerVisual_05.StartAnimation("Opacity", OpacityScalarAnimation_0_to_1_0(), AnimationController_0());
_containerVisual_07.StartAnimation("RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_0_to_0(), AnimationController_0());
_containerVisual_10.StartAnimation("Opacity", OpacityScalarAnimation_0_to_1_1(), AnimationController_0());
_containerVisual_12.StartAnimation("RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_0_to_m180(), AnimationController_0());
_containerVisual_12.StartAnimation("Scale", ScaleVector3Animation_0(), AnimationController_0());
_containerVisual_12.Properties.StartAnimation("Position.Y", PositionYScalarAnimation_14p5_to_6p5(), AnimationController_0());
_containerVisual_15.StartAnimation("Opacity", OpacityScalarAnimation_0_to_1_2(), AnimationController_0());
_containerVisual_17.StartAnimation("RotationAngleInDegrees", RotationAngleInDegreesScalarAnimation_0_to_180(), AnimationController_0());
_containerVisual_17.StartAnimation("Scale", ScaleVector3Animation_1(), AnimationController_0());
_containerVisual_17.Properties.StartAnimation("Position.Y", PositionYScalarAnimation_11p5_to_3p5(), AnimationController_0());
}
public void DestroyAnimations()
{
_containerVisual_00.StopAnimation("Opacity");
_containerVisual_02.StopAnimation("RotationAngleInDegrees");
_containerVisual_05.StopAnimation("Opacity");
_containerVisual_07.StopAnimation("RotationAngleInDegrees");
_containerVisual_10.StopAnimation("Opacity");
_containerVisual_12.StopAnimation("RotationAngleInDegrees");
_containerVisual_12.StopAnimation("Scale");
_containerVisual_12.Properties.StopAnimation("Position.Y");
_containerVisual_15.StopAnimation("Opacity");
_containerVisual_17.StopAnimation("RotationAngleInDegrees");
_containerVisual_17.StopAnimation("Scale");
_containerVisual_17.Properties.StopAnimation("Position.Y");
}
}
}
}