Fabulous API
Documentation
2.0
2.0
  • Welcome
  • Xamarin.Forms
    • AnyView
    • Application
    • Element
    • NavigableElement
    • VisualElement
    • View
    • Controls
      • ActivityIndicator
      • BoxView
      • Button
      • CheckBox
      • DatePicker
      • Editor
      • Entry
      • FormattedLabel
      • ImageButton
      • Image
      • IndicatorView
      • InputView
      • Label
      • Picker
      • ProgressBar
      • RadioButton
      • SearchBar
      • Slider
      • Span
      • Stepper
      • Switch
      • TimePicker
      • WebView
    • Collections
      • CarouselView
      • CollectionView
      • ItemsView
      • ListView
    • Layouts
      • Layout
      • TemplatedView
  • .NET MAUI
    • AnyView
    • Application
    • Element
    • NavigableElement
    • VisualElement
    • View
    • Controls
      • ActivityIndicator
      • BoxView
      • Button
      • CheckBox
      • DatePicker
      • Editor
      • Entry
      • FormattedLabel
      • ImageButton
      • Image
      • IndicatorView
      • InputView
      • Label
      • Picker
      • ProgressBar
      • RadioButton
      • SearchBar
      • Slider
      • Span
      • Stepper
      • Switch
      • TimePicker
      • WebView
    • Collections
      • CarouselView
      • CollectionView
      • ItemsView
      • ListView
    • Layouts
      • Layout
      • TemplatedView
  • Avalonia
    • AnyView
    • Application
    • RenderOptions
    • Animatable
    • StyledElement
    • Transform
    • Visual
    • Layoutable
    • InputElement
    • DragDrop
    • FlyoutBase
    • PopupFlyoutBase
    • Control
    • Decorator
    • TemplatedControl
    • ContentControl
    • Spinner
    • TopLevel
    • TextElement
    • ItemsControl
    • SelectingItemsControl
    • MenuBase
    • WindowBase
    • Styling
      • KeyFrame
      • Animation
      • Transition
      • Style
    • Media
      • Transforms
        • Transform
        • MatrixTransform
        • SkewTransform
        • RotateTransform
        • TranslateTransform
        • ScaleTransform
        • Rotate3DTransform
        • TransformGroup
      • Brushes
        • Brush
        • TileBrush
        • SolidColorBrush
        • VisualBrush
        • ImageBrush
        • DrawingBrush
        • GradientStop
        • GradientBrush
        • ConicGradientBrush
        • LinearGradientBrush
        • RadialGradientBrush
      • PathSegments
        • PathSegment
        • ArcSegment
        • BezierSegment
        • PolyLineSegment
        • QuadraticBezierSegment
        • PathFigure
      • Geometries
        • Geometry
        • LineGeometry
        • EllipseGeometry
        • RectangleGeometry
        • PolylineGeometry
        • PathGeometry
        • CombinedGeometry
        • GeometryGroup
      • DashStyle
      • Pen
      • Drawing
      • Effects
Powered by GitBook
On this page
  • Constructors
  • Properties
  • Usages
Edit on GitHub
  1. Avalonia
  2. Styling

Animation

PreviousKeyFrameNextTransition

Last updated 1 year ago

Inheritance: AvaloniaUI documentation: Animation

Constructors

Constructors
Description

Animation(duration: TimeSpan)

Creates a Animation widget with the specified duration and keyframes.

Animation()

Creates a Animation widget with keyframes.

Properties

Properties
Description

repeatForever(this: WidgetBuilder<'msg, #IFabAnimation>)

Sets the IterationCount property to Infinite

repeatCount(value: int)

Sets the IterationCount property to the specified value

playbackDirection(value: PlaybackDirection)

Sets the PlaybackDirection property

fillMode(value: FillMode)

Sets the FillMode property

easing(value: Easing)

Sets the Easing property

delay(value: TimeSpan)

Sets the Delay property

delayBetweenIterations(value: TimeSpan)

Sets the DelayBetweenIterations property

speedRatio(value: float)

Sets the SpeedRatio property

reference(value: ViewRef)

Link a ViewRef to access the direct Animation control instance

Usages

Animation(KeyFrame(RotateTransform.AngleProperty, 360.).cue(1.), TimeSpan.FromSeconds(2.))
    .repeatForever()

(Animation(TimeSpan.FromSeconds(3.)) {
    KeyFrame(Rotate3DTransform.AngleXProperty, 0.).cue(0.)
    KeyFrame(Visual.ZIndexProperty, 4).cue(0.)
    KeyFrame(Rotate3DTransform.AngleXProperty, 90.).cue(0.25)
    KeyFrame(Visual.ZIndexProperty, 1).cue(0.25)
    KeyFrame(Rotate3DTransform.AngleXProperty, 360.).cue(1.)
    KeyFrame(Visual.ZIndexProperty, 4).cue(1.)
})
.repeatForever()

Get access to the underlying Animation

let animationRef = ViewRef<Animation>()

Animation(KeyFrame(RotateTransform.AngleProperty, 360.).cue(1.), TimeSpan.FromSeconds(2.))
    .reference(keyFrameRef)
AvaloniaObject
API