/// <summary> /// create an observable for animating multiple related values at once /// </summary> /// <param name="fromValues">the observable values to animate from</param> /// <param name="toValues">the observable values to animate to</param> /// <returns>observable animation progress for subscription and updating the target object</returns> public IObservable <IEnumerable <AnimationProgress> > CreateObservable(IObservable <IEnumerable <AnimatableValue> > fromValues, IObservable <IEnumerable <AnimatableValue> > toValues) { return(Progress.CombineLatest(fromValues.DistinctUntilChanged(), toValues.DistinctUntilChanged(), (p, f, t) => f.Join(t, fv => fv.Key, tv => tv.Key, (fv, tv) => new AnimationProgress { Key = fv.Key, FromValue = fv.Value, ToValue = tv.Value, Progress = p }))); }