Skip to main content
A newer version of this page is available. .

CarouselPanel.OffsetAnimationAddFunction Property

Gets or sets the function whose values are added to the CarouselPanel.OffsetDistributionFunction function when calculating positions of an item during its animation (its movement from one position to another).

Namespace: DevExpress.Xpf.Carousel

Assembly: DevExpress.Xpf.Carousel.v19.2.dll

Declaration

public FunctionBase OffsetAnimationAddFunction { get; set; }

Property Value

Type Description
FunctionBase

A FunctionBase descendant that represents a corresponding function.

Remarks

Positions of items along the path are calculated according to the CarouselPanel.OffsetDistributionFunction function. Values provided by the OffsetAnimationAddFunction function are added to CarouselPanel.OffsetDistributionFunction function when calculating transitional positions of an item during its movement from one point to another. The OffsetAnimationAddFunction function allows you to implement accelaration and deceleration effects when items are moved.

The function assigned to the OffsetAnimationAddFunction property must be defined in the range [0;1], where the values of 0 and 1 correspond to the starting and ending points of an item’s movement. The function may return any value. However, note that the values returned are added to the values of the CarouselPanel.OffsetDistributionFunction. The resulting values must be in the range [0;1]. If a resulting value is less than 0 or greater than 1, the current item will not be displayed at the current position. So, typically the OffsetAnimationAddFunction function must return small values.

An example of using the OffsetAnimationAddFunction property is given in the CarouselDemo project.

See Also