New to Telerik UI for WinForms? Start a free 30-day trial

ICarouselPath

Interface

Defines how a carousel computes item positions along a path and applies path-driven animation values.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public interface ICarouselPath : INotifyPropertyChanged

Inherited Members INotifyPropertyChanged.PropertyChanged

Properties

Gets or sets whether X and Y coordinates are treated as percentages of the owner size; Z is unchanged.

C#
bool EnableRelativePath { get; set; }

Gets the point used when an item leaves the path.

C#
object FinalPathPoint { get; }

Gets the point used when an item enters the path.

C#
object InitialPathPoint { get; }

Gets or sets the denominator used to convert a path point's Z coordinate into item scale; larger values reduce the effect per unit Z.

C#
double ZScale { get; set; }

Methods

Applies a path evaluation to an item, including location, opacity, scale, and any path-derived Z-index.

C#
void ApplyToElement(VisualElement element, CarouselPathAnimationData data, double value, object evaluated, Animations flags, Size controlSize)
Parameters:elementVisualElement

The carousel visual element to update.

dataCarouselPathAnimationData

The animation data associated with the item.

valuedouble

The current carousel-location value used to select the path segment.

evaluatedobject

The path evaluation passed to the selected path segment.

flagsAnimations

The animation properties to apply.

controlSizeSize

The size used to resolve relative path coordinates.

Converts a relative path point's X and Y percentages to owner-size coordinates without changing Z.

C#
Point3D ConvertFromRelativePath(Point3D point, Size ownerSize)
Parameters:pointPoint3D

The point whose X and Y coordinates are percentages.

ownerSizeSize

The size used to scale the coordinates.

Returns:

Point3D

A new point in owner-size coordinates.

Converts a point's X and Y owner-size coordinates to percentages without changing Z.

C#
Point3D ConvertToRelativePath(Point3D point, Size ownerSize)
Parameters:pointPoint3D

The point in owner-size coordinates.

ownerSizeSize

The size used to scale the coordinates.

Returns:

Point3D

A new point with relative X and Y coordinates.

Creates the animation that moves an item between carousel-location values and stores it in the animation data.

C#
void CreateAnimation(VisualElement element, CarouselPathAnimationData data, int frames, int delay)
Parameters:elementVisualElement

The carousel visual element to animate.

dataCarouselPathAnimationData

The animation data that supplies endpoints and receives the created animation.

framesint

The number of animation frames.

delayint

The delay passed to the animated property setting.

Evaluates the path for a carousel-location value; the base path implementation returns null for values handled outside the path segment.

C#
object Evaluate(VisualElement element, CarouselPathAnimationData data, object value)
Parameters:elementVisualElement

The carousel visual element being evaluated.

dataCarouselPathAnimationData

The animation data associated with the evaluation.

valueobject

A boxed double carousel-location value to evaluate.

Returns:

object

The evaluated path point, or null when the value is outside the path segment.

Places a newly added item at the path's initial point and applies its initial animation state.

C#
void InitializeItem(VisualElement element, object flags)
Parameters:elementVisualElement

The carousel visual element to initialize.

flagsobject

The Animations flags that select the initial effects.

Gets the number of item positions represented by the path, including the repeated endpoint for a closed path.

C#
double PositionsCount(int itemsCount)
Parameters:itemsCountint

The number of carousel items.

Returns:

double

The item count, plus one for a closed path, clamped to zero or greater.

Gets the normalized position increment between adjacent items.

C#
double Step(int itemsCount)
Parameters:itemsCountint

The number of carousel items.

Returns:

double

The reciprocal of at least one path position.

Indicates whether the path supplies item Z-index values from its evaluated Z coordinates.

C#
bool ZindexFromPath()
Returns:

bool

true when Z-index is derived from the path.