public ParsedCommand( IdentiferToken commandIdentifier, params OptionToken[] commandOptions) { CommandIdentifier = commandIdentifier; CommandOptions = commandOptions; }
public void SetTargetProperty(IdentiferToken targetProperty) { var ppc = new PropertyPathConverter(); var propertyPath = ppc.ConvertFrom(targetProperty.Text); var pp = propertyPath as PropertyPath; if (pp == null) { throw new FormatException($"TargetProperty path cannot be resolved from \"{targetProperty.Text}\"."); } Storyboard.SetTargetProperty(CompositeAnimation, (PropertyPath)propertyPath); }
public void SetEasing(IdentiferToken easingMode, IdentiferToken easingFunctionType, NumberLiteralToken param1 = null, NumberLiteralToken param2 = null) { var c1 = TypeDescriptor.GetConverter(typeof(EasingMode)); var easingModeValue = (EasingMode)c1.ConvertFromInvariantString(easingMode.Text); var converter = TypeDescriptor.GetConverter(typeof(EasingType)); var param1val = (param1 == null) ? (double?)null : Convert.ToDouble(param1.Text); var param2val = (param2 == null) ? (int?)null : Convert.ToInt32(param2.Text); var easingFunctionTypeValue = (EasingType)converter.ConvertFromInvariantString(easingFunctionType.Text); var easingFunctionValue = createEasingFunction(easingFunctionTypeValue, easingModeValue, param1val, param2val); var easingFunctionProperty = ReflectionHelper.GetDependencyProperty("EasingFunction", typeof(T), true); CompositeAnimation.SetValue(easingFunctionProperty, easingFunctionValue); }
public void SetTargetName(IdentiferToken targetName) { Storyboard.SetTargetName(CompositeAnimation, targetName.Text); }