/// <summary>
        ///     Returns the presentation of the <paramref name="doubleTransition" /> by converting it to an instance of
        ///     <see cref="DoubleAnimation" /> which can be added to a <see cref="Storyboard" />.
        /// </summary>
        public static DoubleAnimation ConvertTo_DoubleAnimation(this IDoubleTransition doubleTransition)
        {
            var doubleAnimation = new DoubleAnimation(
                doubleTransition.TransitionFromValue,
                doubleTransition.TransitionToValue,
                doubleTransition.TransitionDuration,
                FillBehavior.HoldEnd)
            {
                BeginTime = doubleTransition.TransitionBeginTime,
            };

            if (doubleTransition.TransitionsType == TransitionTypes.Cubic)
            {
                doubleAnimation.EasingFunction = new CubicEase();
            }
            else if (doubleTransition.TransitionsType == TransitionTypes.Exponential)
            {
                doubleAnimation.EasingFunction = new ExponentialEase();
            }

            Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath(doubleTransition.TransitionPropertyPath));
            return(doubleAnimation);
        }
Exemplo n.º 2
0
		///	<summary> 
		///		This method copy's each database field which is in the <paramref name="includedColumns"/> 
		///		from the <paramref name="source"/> interface to this data row.
		/// </summary>
		public void Copy_From_But_TakeOnly(IDoubleTransition source, params string[] includedColumns)
		{
			if (includedColumns.Contains(DoubleTransitionsTable.IdCol)) this.Id = source.Id;
			if (includedColumns.Contains(DoubleTransitionsTable.PageIdCol)) this.PageId = source.PageId;
			if (includedColumns.Contains(DoubleTransitionsTable.BeginnTimeSecondsCol)) this.BeginnTimeSeconds = source.BeginnTimeSeconds;
			if (includedColumns.Contains(DoubleTransitionsTable.DurationSecondsCol)) this.DurationSeconds = source.DurationSeconds;
			if (includedColumns.Contains(DoubleTransitionsTable.FromValueCol)) this.FromValue = source.FromValue;
			if (includedColumns.Contains(DoubleTransitionsTable.ToValueCol)) this.ToValue = source.ToValue;
			if (includedColumns.Contains(DoubleTransitionsTable.PropertyPathCol)) this.PropertyPath = source.PropertyPath;
			if (includedColumns.Contains(DoubleTransitionsTable.TransitionTypeCol)) this.TransitionType = source.TransitionType;
		}
Exemplo n.º 3
0
		///	<summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary>
		public void Copy_From(IDoubleTransition source, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) this.Id = source.Id;
			this.PageId = source.PageId;
			this.BeginnTimeSeconds = source.BeginnTimeSeconds;
			this.DurationSeconds = source.DurationSeconds;
			this.FromValue = source.FromValue;
			this.ToValue = source.ToValue;
			this.PropertyPath = source.PropertyPath;
			this.TransitionType = source.TransitionType;
		}
Exemplo n.º 4
0
		///	<summary> This method copy's each database field into the <paramref name="target"/> interface. </summary>
		public void Copy_To(IDoubleTransition target, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) target.Id = this.Id;
			target.PageId = this.PageId;
			target.BeginnTimeSeconds = this.BeginnTimeSeconds;
			target.DurationSeconds = this.DurationSeconds;
			target.FromValue = this.FromValue;
			target.ToValue = this.ToValue;
			target.PropertyPath = this.PropertyPath;
			target.TransitionType = this.TransitionType;
		}