Class EasingFunctionTypeConverter
- Namespace
- Icy.Animations
- Assembly
- IcyUI.dll
Converts the name of one of Easing's standard functions, written as text, into the matching EasingFunction, so easing-valued properties can be set from a string.
public class EasingFunctionTypeConverter : TypeConverter
- Inheritance
-
EasingFunctionTypeConverter
- Inherited Members
- Extension Methods
Remarks
Attached to EasingFunction itself, which is what lets TypeConversionManager -
and therefore markup - handle Easing="EaseOutCubic" without registering anything. The name is looked
up, case-insensitively, against Easing's public static properties (Linear,
EaseInQuad, EaseOutQuad, EaseInOutQuad, EaseInCubic, EaseOutCubic,
EaseInOutCubic).
Only the standard named functions declared on Easing are covered. A custom EasingFunction needs to be assigned from code instead, since an arbitrary function has no textual representation.
Methods
CanConvertFrom(ITypeDescriptorContext?, Type)
Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context.
public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
Parameters
contextITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
sourceTypeTypeA Type that represents the type you want to convert from.
Returns
ConvertFrom(ITypeDescriptorContext?, CultureInfo?, object)
Converts the given object to the type of this converter, using the specified context and culture information.
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
Parameters
contextITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
cultureCultureInfoThe CultureInfo to use as the current culture.
valueobjectThe object to convert.
Returns
Exceptions
- NotSupportedException
The conversion cannot be performed.