Skip to content

Commit

Permalink
feat: AnimatedIcon
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Jun 24, 2021
1 parent 27a35b5 commit 607d3b9
Show file tree
Hide file tree
Showing 6 changed files with 339 additions and 167 deletions.
@@ -1,8 +1,8 @@
using System;
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
// MUX Reference AnimatedIcon.cpp, commit 893116c

using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Uno.Disposables;
using Windows.UI.Composition;
using Windows.UI.Xaml.Controls;
Expand All @@ -18,7 +18,8 @@ public partial class AnimatedIcon

private string m_currentState = "";
private string m_previousState = "";
private string m_queuedState = "";
private Queue<string> m_queuedStates = new Queue<string>();
private int m_queueLength = 2;
private string m_pendingState = "";
private string m_lastAnimationSegment = "";
private string m_lastAnimationSegmentStart = "";
Expand All @@ -28,7 +29,7 @@ public partial class AnimatedIcon
private float m_previousSegmentLength = 1.0f;
private float m_durationMultiplier = 1.0f;
private float m_speedUpMultiplier = 7.0f;

private bool m_isSpeedUp = false;

private CompositionPropertySet m_progressPropertySet = null;
private CompositionScopedBatch m_batch = null;
Expand All @@ -37,6 +38,6 @@ public partial class AnimatedIcon
private SerialDisposable m_layoutUpdatedRevoker = new SerialDisposable();
private SerialDisposable m_foregroundColorPropertyChangedRevoker = new SerialDisposable();

private AnimatedIconAnimationQueueBehavior m_queueBehavior = AnimatedIconAnimationQueueBehavior.SpeedUpQueueOne;
private AnimatedIconAnimationQueueBehavior m_queueBehavior = AnimatedIconAnimationQueueBehavior.QueueOne;
}
}
@@ -1,4 +1,8 @@
using Windows.UI.Xaml;
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
// MUX Reference AnimatedIcon.properties.cpp, commit f4d781d

using Windows.UI.Xaml;

namespace Microsoft.UI.Xaml.Controls
{
Expand Down

0 comments on commit 607d3b9

Please sign in to comment.