Class TransitioningContentControl
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
PageTransitionProperty
Defines the PageTransition property.
public static readonly StyledProperty<IPageTransition?> PageTransitionProperty
Field Value
TransitionCompletedEvent
Defines the TransitionCompleted routed event.
public static readonly RoutedEvent<TransitionCompletedEventArgs> TransitionCompletedEvent
Field Value
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
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
Methods
ArrangeOverride(Size)
Positions child elements as part of a layout pass.
protected override Size ArrangeOverride(Size finalSize)
Parameters
finalSize
SizeThe 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
VisualTreeAttachmentEventArgsThe event args.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.
RegisterContentPresenter(ContentPresenter)
Called when an ContentPresenter is registered with the control.
protected override bool RegisterContentPresenter(ContentPresenter presenter)
Parameters
presenter
ContentPresenterThe presenter.
Returns
Events
TransitionCompleted
Raised when the old content isn't needed anymore by the control, because the transition has completed.
public event EventHandler<TransitionCompletedEventArgs> TransitionCompleted