Table of Contents

Class TransitioningContentControl

Namespace
Avalonia.Controls
Assembly
Avalonia.Controls.dll

Displays Content according to an IDataTemplate, using a PageTransition to move between the old and new content.

public class TransitioningContentControl : ContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance
TransitioningContentControl
Implements
Inherited Members
Extension Methods

Constructors

TransitioningContentControl()

public TransitioningContentControl()

Fields

IsTransitionReversedProperty

Defines the IsTransitionReversed property.

public static readonly StyledProperty<bool> IsTransitionReversedProperty

Field Value

StyledProperty<bool>

PageTransitionProperty

Defines the PageTransition property.

public static readonly StyledProperty<IPageTransition?> PageTransitionProperty

Field Value

StyledProperty<IPageTransition>

TransitionCompletedEvent

Defines the TransitionCompleted routed event.

public static readonly RoutedEvent<TransitionCompletedEventArgs> TransitionCompletedEvent

Field Value

RoutedEvent<TransitionCompletedEventArgs>

Properties

IsTransitionReversed

Gets or sets a value indicating whether the control will be animated in the reverse direction.

public bool IsTransitionReversed { get; set; }

Property Value

bool

Remarks

May not apply to all transitions.

PageTransition

Gets or sets the animation played when content appears and disappears.

public IPageTransition? PageTransition { get; set; }

Property Value

IPageTransition

Methods

ArrangeOverride(Size)

Positions child elements as part of a layout pass.

protected override Size ArrangeOverride(Size finalSize)

Parameters

finalSize Size

The size available to the control.

Returns

Size

The actual size used.

OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)

Called when the control is added to a rooted visual tree.

protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)

Parameters

e VisualTreeAttachmentEventArgs

The event args.

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

Parameters

change AvaloniaPropertyChangedEventArgs

The property change details.

RegisterContentPresenter(ContentPresenter)

Called when an ContentPresenter is registered with the control.

protected override bool RegisterContentPresenter(ContentPresenter presenter)

Parameters

presenter ContentPresenter

The presenter.

Returns

bool

Events

TransitionCompleted

Raised when the old content isn't needed anymore by the control, because the transition has completed.

public event EventHandler<TransitionCompletedEventArgs> TransitionCompleted

Event Type

EventHandler<TransitionCompletedEventArgs>