private void InitFrames() { if (_initialKeyFrame == null) { _initialKeyFrame = new KeyFrame <TValue> { Value = (TValue)Target.GetValue(TargetProperty), KeyTime = 0 }; } _sortedKeyFrames = KeyFrames.OrderBy(x => x.KeyTime).ToList(); _sortedKeyFrames.Insert(0, _initialKeyFrame); Duration = (uint)_sortedKeyFrames.Last().KeyTime; }