Skip to main content

IndicatorAnimation Class

Contains settings for animating a value indicator when it changes its value.

Namespace: DevExpress.Xpf.Gauges

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

NuGet Package: DevExpress.Wpf.Gauges

Declaration

public class IndicatorAnimation :
    AnimationBase

The following members return IndicatorAnimation objects:

Remarks

Use the IndicatorAnimation class properties to adjust how value indicators should be animated (e.g. the AnimationBase.Duration property to set the animation time; AnimationBase.EasingFunction to specify the type of animation, etc.).

An object of the IndicatorAnimation class can be accessed via the ValueIndicatorBase.Animation property.

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>

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

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