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:
public abstract class CarouselParameterPath : ICarouselPath, INotifyPropertyChanged
Inheritance: objectCarouselParameterPath
Derived Classes:
Implements:
Constructors
Initializes the default value ranges used to map carousel entry, path travel, and exit values.
public CarouselParameterPath()
Fields
Indicates that derived path evaluation data must be recalculated.
protected bool isModified
Maps carousel-location intervals to the path's entry, travel, and exit intervals.
protected ValueMapper ranges
Indicates whether the path's Z coordinate supplies item Z-index values.
protected bool zIndexFromPathValue
Multiplier applied to path Z coordinates when deriving item Z-index values.
protected double zIndexScale
Properties
Gets the point at which an item finishes traversing the path.
public abstract object FinalPathPoint { get; }
Implements:
Gets the point at which an item begins traversing the path.
public abstract object InitialPathPoint { get; }
Implements:
Gets whether this path is closed. The base implementation treats it as closed; derived paths can override this test.
protected virtual bool IsClosedPath { get; }
Gets whether the initial and final path points are equal.
public virtual bool IsPathClosed { get; }
Methods
Applies the entry, path-travel, or exit state selected by the carousel-location value.
public void ApplyToElement(VisualElement element, CarouselPathAnimationData data, double value, object evaluated, Animations flags, Size controlSize)
The carousel element to update.
dataCarouselPathAnimationDataThe animation data associated with the item.
valuedoubleThe current carousel-location value.
evaluatedobjectThe path point calculated for the travel segment.
flagsAnimationsThe animation properties to apply.
controlSizeSizeThe size used to resolve relative path coordinates.
Implements:
Converts relative X and Y coordinates to owner-size coordinates, preserving Z.
Converts owner-size X and Y coordinates to percentages, preserving Z.
Creates an animation for the carousel-location property, resolving omitted endpoints from the item's current location and path ranges.
public void CreateAnimation(VisualElement element, CarouselPathAnimationData data, int frames, int delay)
The carousel element to animate.
dataCarouselPathAnimationDataThe animation data supplying endpoints and receiving the created animation.
framesintThe number of animation frames.
delayintThe delay passed to the animated property setting.
Implements:
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.
public object Evaluate(VisualElement element, CarouselPathAnimationData data, object value)
The carousel element associated with the evaluation.
dataCarouselPathAnimationDataThe animation data that can select special handling.
valueobjectAn object containing the boxed carousel-location value as a double.
Returns:The evaluated point in the path segment, or null when the value is handled outside that segment.
Implements:
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.
public abstract object EvaluateByParameter(VisualElement element, CarouselPathAnimationData data, double value)
The carousel element associated with the evaluation.
dataCarouselPathAnimationDataThe animation data associated with the evaluation.
valuedoubleThe parameter supplied to the concrete path evaluator.
Returns:The evaluated path point.
Places an item at the initial path point and sets its initial opacity, scale, and path-derived Z-index.
public void InitializeItem(VisualElement element, object flags)
The carousel item to initialize.
flagsobjectThe animation properties to initialize.
Implements:
Raises PropertyChanged with the supplied event data.
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
The property-change details to publish.
Raises PropertyChanged for the named property.
protected void OnPropertyChanged(string propertyName)
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.
Events
Occurs when a path property changes.
public event PropertyChangedEventHandler PropertyChanged
Implements: