/// <inheritdoc/> public override void ApplyInitialValues(UIElement target) { base.ApplyInitialValues(target); AnimationContext context = new AnimationContext(target); if (this.CenterX.HasValue) { context.InitializeCenterOfRotationX(this.CenterX.Value); } if (this.CenterY.HasValue) { context.InitializeCenterOfRotationY(this.CenterY.Value); } if (this.CenterZ.HasValue) { context.InitializeCenterOfRotationZ(this.CenterZ.Value); } context.InitializeRotationX(this.StartAngleX); context.InitializeRotationY(this.StartAngleY); context.InitializeRotationZ(this.StartAngleZ); }
private void SetPlaneProjection(AnimationContext context) { if (context.Target.Projection == null) { PlaneProjection projection = new PlaneProjection(); context.Target.Projection = projection; } if (this.CenterX.HasValue) { context.InitializeCenterOfRotationX(this.CenterX.Value); } if (this.CenterY.HasValue) { context.InitializeCenterOfRotationY(this.CenterY.Value); } if (this.CenterZ.HasValue) { context.InitializeCenterOfRotationZ(this.CenterZ.Value); } }