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

Base implementation for carousel paths parameterized by a normalized value, including path evaluation, item animation, and relative-coordinate conversion.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public abstract class CarouselParameterPath : ICarouselPath, INotifyPropertyChanged

Inheritance: objectCarouselParameterPath

Derived Classes: CarouselBezierPathCarouselEllipsePath

Implements: ICarouselPathINotifyPropertyChanged

Constructors

Initializes the default value ranges used to map carousel entry, path travel, and exit values.

C#
public CarouselParameterPath()

Fields

Indicates that derived path evaluation data must be recalculated.

C#
protected bool isModified

Maps carousel-location intervals to the path's entry, travel, and exit intervals.

C#
protected ValueMapper ranges

Indicates whether the path's Z coordinate supplies item Z-index values.

C#
protected bool zIndexFromPathValue

Multiplier applied to path Z coordinates when deriving item Z-index values.

C#
protected double zIndexScale

Properties

Gets the point at which an item finishes traversing the path.

C#
public abstract object FinalPathPoint { get; }

Implements: ICarouselPath.FinalPathPoint

Gets the point at which an item begins traversing the path.

C#
public abstract object InitialPathPoint { get; }

Implements: ICarouselPath.InitialPathPoint

Gets whether this path is closed. The base implementation treats it as closed; derived paths can override this test.

C#
protected virtual bool IsClosedPath { get; }

Gets whether the initial and final path points are equal.

C#
public virtual bool IsPathClosed { 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. The default is 500.

C#
public double ZScale { get; set; }

Implements: ICarouselPath.ZScale

Methods

Applies the entry, path-travel, or exit state selected by the carousel-location value.

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

The carousel element to update.

dataCarouselPathAnimationData

The animation data associated with the item.

valuedouble

The current carousel-location value.

evaluatedobject

The path point calculated for the travel segment.

flagsAnimations

The animation properties to apply.

controlSizeSize

The size used to resolve relative path coordinates.

Implements: ICarouselPath.ApplyToElement(VisualElement, CarouselPathAnimationData, double, object, Animations, Size)

Converts relative X and Y coordinates to owner-size coordinates, preserving Z.

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

The point whose X and Y values are percentages.

ownerSizeSize

The owner dimensions used for conversion.

Returns:

Point3D

A new point in owner-size coordinates.

Implements: ICarouselPath.ConvertFromRelativePath(Point3D, Size)

Converts owner-size X and Y coordinates to percentages, preserving Z.

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

The point in owner-size coordinates.

ownerSizeSize

The owner dimensions used for conversion.

Returns:

Point3D

A new point in relative coordinates.

Implements: ICarouselPath.ConvertToRelativePath(Point3D, Size)

Creates an animation for the carousel-location property, resolving omitted endpoints from the item's current location and path ranges.

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

The carousel element to animate.

dataCarouselPathAnimationData

The animation data supplying endpoints and receiving the created animation.

framesint

The number of animation frames.

delayint

The delay passed to the animated property setting.

Implements: ICarouselPath.CreateAnimation(VisualElement, CarouselPathAnimationData, int, int)

In special-handling mode, an explicit From value selects the animation direction and is then cleared; in normal mode it is mapped and cleared. A missing To is replaced with positive infinity.

Maps a carousel-location value to the path's normalized parameter and evaluates the path for values in the travel segment.

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

The carousel element associated with the evaluation.

dataCarouselPathAnimationData

The animation data that can select special handling.

valueobject

An object containing the boxed carousel-location value as a double.

Returns:

object

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

Implements: ICarouselPath.Evaluate(VisualElement, CarouselPathAnimationData, object)

Evaluates the concrete path at the supplied parameter. The base Evaluate(VisualElement, CarouselPathAnimationData, object) method supplies a normalized value; direct calls are not clamped by this class.

C#
public abstract object EvaluateByParameter(VisualElement element, CarouselPathAnimationData data, double value)
Parameters:elementVisualElement

The carousel element associated with the evaluation.

dataCarouselPathAnimationData

The animation data associated with the evaluation.

valuedouble

The parameter supplied to the concrete path evaluator.

Returns:

object

The evaluated path point.

Places an item at the initial path point and sets its initial opacity, scale, and path-derived Z-index.

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

The carousel item to initialize.

flagsobject

The animation properties to initialize.

Implements: ICarouselPath.InitializeItem(VisualElement, object)

Raises PropertyChanged with the supplied event data.

C#
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

The property-change details to publish.

Raises PropertyChanged for the named property.

C#
protected void OnPropertyChanged(string propertyName)
Parameters:propertyNamestring

The name of the changed property.

Gets the number of item positions on this path, adding one position when the path is closed and never returning a negative value.

C#
public double PositionsCount(int itemsCount)
Parameters:itemsCountint

The number of carousel items.

Returns:

double

The number of positions used to distribute the items.

Implements: ICarouselPath.PositionsCount(int)

Gets the normalized parameter increment between adjacent item positions.

C#
public double Step(int itemsCount)
Parameters:itemsCountint

The number of carousel items.

Returns:

double

The reciprocal of the greater of one and the number of path positions.

Implements: ICarouselPath.Step(int)

Indicates whether this path derives item Z-index values from evaluated path coordinates.

C#
public bool ZindexFromPath()
Returns:

bool

true when the derived path has enabled Z-based ordering.

Implements: ICarouselPath.ZindexFromPath()

Events

Occurs when a path property changes.

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged