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

Parameter.DistributionFunction Property

Specifies the function that affects the parameter value along the entire item movement path.

Namespace: DevExpress.Xpf.Carousel

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

Declaration

public FunctionBase DistributionFunction { get; set; }

Property Value

Type Description
FunctionBase

A FunctionBase descendant specifying the function.

Remarks

This property specifies one of three functions that can affect a parameter value at a given point. For detailed information, see Functions and Parameters.

Example

This example shows you how to create a parameter that is used to provide custom scaling for elements along the path and during transition animations. Two new function classes are declared. One is used to increase the element size from the start to the end of the path. Another provides zooming animation effects for element transitions. These functions, and one built-in function, are used to initialize a custom parameter. XAML code then binds the parameter to scaling transformation properties. See Lesson 4 - Using Functions and Parameters for details.

public class MyScaleDistributionFunction : DevExpress.Xpf.Carousel.FunctionBase {
    protected override double GetValueOverride(double x) {
        return x * x * 0.8 + 0.2;
    }
}
public class MyScaleAnimationFunction : DevExpress.Xpf.Carousel.FunctionBase {
    protected override double GetValueOverride(double x) {
        if (x < 0.5)
            return x + 1;
        return 2 - x;
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DistributionFunction property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also