Skip to main content

IndicatorAnimation.EasingFunction Property

Gets or sets an animation function that defines how indicator values change during animation.

Namespace: DevExpress.Xpf.Gauges

Assembly: DevExpress.Xpf.Gauges.v23.2.dll

NuGet Package: DevExpress.Wpf.Gauges

Declaration

public IEasingFunction EasingFunction { get; set; }

Property Value

Type Description
IEasingFunction

An object implementing the IEasingFunction interface.

Example

This example demonstrates how to use animation effects in DXGauges.

To activate animation, set the GaugeControlBase.EnableAnimation property to True. After that, it becomes possible to customize the animation’s duration and easing function via its IndicatorAnimation.Duration and IndicatorAnimation.EasingFunction properties.

<Window x:Class="DXGauges_Animation.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxga="http://schemas.devexpress.com/winfx/2008/xaml/gauges"
        Title="MainWindow" Height="350" Width="525" >
    <Grid>
        <!--region #EnableAnimation-->
        <dxga:CircularGaugeControl EnableAnimation="True">
        <!--endregion #EnableAnimation-->
            <dxga:CircularGaugeControl.Scales>
                <dxga:ArcScale>
                    <dxga:ArcScale.Needles>
                        <!--region #EnableEditing-->
                        <dxga:ArcScaleNeedle IsInteractive="True">
                        <!--endregion #EnableEditing-->
                            <dxga:ArcScaleNeedle.Animation>
                                <dxga:IndicatorAnimation Duration="00:00:02.0000000">
                                    <dxga:IndicatorAnimation.EasingFunction>
                                        <BounceEase/>
                                    </dxga:IndicatorAnimation.EasingFunction>
                                </dxga:IndicatorAnimation>
                            </dxga:ArcScaleNeedle.Animation>
                        </dxga:ArcScaleNeedle>
                    </dxga:ArcScale.Needles>
                </dxga:ArcScale>
            </dxga:CircularGaugeControl.Scales>
        </dxga:CircularGaugeControl>
    </Grid>
</Window>
See Also