Class TransitioningContentControl
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.WinUI.dll
A control with a single transition.
public class TransitioningContentControl : ContentControl, IEquatable<DependencyObject>, IAnimationObject, IVisualElement, IVisualElement2, IEquatable<UIElement>, IEquatable<FrameworkElement>, IEquatable<Control>, IWinRTObject, IDynamicInterfaceCastable, IEquatable<ContentControl>
- Inheritance
-
Transitioning
Content Control
- Implements
-
IWin
RTObject
- Derived
- Inherited Members
- Extension Methods
Constructors
TransitioningContentControl()
Fields
TransitionDirectionProperty
Identifies the Direction dependency property.
Field Value
- Dependency
Property
Remarks
The default value is Left.
TransitionDurationProperty
Identifies the Duration dependency property.
Field Value
- Dependency
Property
Remarks
The default value is 0.3 seconds.
TransitionProperty
Identifies the Transition dependency property.
Field Value
- Dependency
Property
Remarks
The default value is Fade.
Properties
Direction
Gets or sets the direction used by directional transitions.
Property Value
- Transitioning
Content .TransitionControl Direction The transition direction. The default is Left.
Remarks
This property is ignored by Fade.
Duration
Gets or sets the transition duration.
Property Value
- Time
Span The duration.
Transition
Gets or sets the transition type used when the content changes.
Property Value
- Transitioning
Content .TransitionControl Type The transition type. The default is Fade.
Remarks
This property selects which visual state(s) the control will attempt to enter during a transition.
Methods
OnApplyTemplate()
Remarks
When the template is applied, the control locates and caches the required template parts and the visual state group used for transitions.
The following parts are required:
PART_Container and PART_CurrentContentPresentationSite. If either is missing, an
Invalid
The PART_PreviousImageSite part is optional; if it is missing, transitions will not run and the control
behaves like a normal Content
Exceptions
- Invalid
Operation Exception Thrown if
PART_ContainerorPART_CurrentContentPresentationSitecannot be found in the applied template.
OnContentChanged(object, object)
Called when the value of the Content property changes.
Parameters
Remarks
This override queues and begins a transition (when possible) before invoking the base implementation. If the required template parts are not available, or the control is already transitioning, the new content is applied immediately without animation.
Events
TransitionCompleted
Occurs when a transition has completed.
Event Type
Remarks
The event is raised after the control returns to the Normal visual state and after the previous content
snapshot has been released.
TransitionStarted
Occurs when a transition has started.
Event Type
Remarks
The event is raised when a transition is about to begin (after the control has prepared the outgoing snapshot and set the new content), but before the first visual state is entered.