Skip to main content

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.1.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