Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

AnimationSelector Class

Represents a base class for objects that provide a custom logic to select a frame animation.

Namespace: DevExpress.Xpf.WindowsUI

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

NuGet Package: DevExpress.Wpf.Controls

#Declaration

public class AnimationSelector

The following members return AnimationSelector objects:

#Remarks

The AnimationSelector class descentants should be assigned to the NavigationFrame.AnimationSelector and Wizard.AnimationSelector settings. See these properties for details.

#Example

The example below shows how to provide a custom storyboard used to render backward and forward navigation for a NavigationFrame. The AnimationSelector‘s SelectStoryboard method override returns a storyboard according to the animation direction.

using System.Windows.Media.Animation;

public class FrameAnimationSelector : DevExpress.Xpf.WindowsUI.AnimationSelector {
    private Storyboard _BackStoryboard;
    private Storyboard _ForwardStoryboard;
    public Storyboard ForwardStoryboard {
        get { return _ForwardStoryboard; }
        set { _ForwardStoryboard = value; }
    }
    public Storyboard BackStoryboard {
        get { return _BackStoryboard; }
        set { _BackStoryboard = value; }
    }
    protected override Storyboard SelectStoryboard(DevExpress.Xpf.WindowsUI.FrameAnimation animation) {
        return animation.Direction == DevExpress.Xpf.WindowsUI.AnimationDirection.Forward ? ForwardStoryboard : BackStoryboard;
    }
}

#Inheritance

Object
AnimationSelector
See Also