In This Article

Transition Class

The base class for a transition between two elements.

public abstract class Transition : DependencyObject, ICloneable
Inheritance:
Object DispatcherObject DependencyObject Object
Derived:
StoryboardTransitionBase
Implements:
ICloneable

Constructors

Transition()

protected Transition()

Properties

ClipToBounds

Gets or sets whether the transition should clip the content elements to the container bounds.

public bool ClipToBounds { get; set; }

Property Value

Boolean:

true if the transition should clip the content elements to the container bounds; otherwise, false. The default value is false.

IsToContentTopMost

Gets or sets whether the "to" content is topmost.

public bool IsToContentTopMost { get; set; }

Property Value

Boolean:

true if the "to" content is topmost; otherwise, false. The default value is true.

Remarks

Transitions that "reveal" the "to" content should return false.

Methods

Clone()

Creates a clone of the Transition.

public Transition Clone()

Returns

Transition:

The clone that was created.

EndTransition(TransitionPresenter, FrameworkElement, Object, FrameworkElement, Object)

Ends a transition, and notifies the presenter that the transition is complete.

protected void EndTransition(TransitionPresenter presenter, FrameworkElement fromContent, object fromContentData, FrameworkElement toContent, object toContentData)
Parameter Type Description
presenter TransitionPresenter

The TransitionPresenter that is managing the transition.

fromContent FrameworkElement

The element from which a transition is occurring.

fromContentData Object

Optional data related to the "from" element that is passed to the OnCompleted(TransitionPresenter, FrameworkElement, Object, FrameworkElement, Object) method.

toContent FrameworkElement

The element to which a transition is occurring.

toContentData Object

Optional data related to the "to" element that is passed to the OnCompleted(TransitionPresenter, FrameworkElement, Object, FrameworkElement, Object) method.

Remarks

This method must be called at the end of the transition so that the presenter is notified of the transition completion.

GetOppositeDirection(TransitionDirection)

Returns the opposite TransitionDirection of the specified TransitionDirection.

public static TransitionDirection GetOppositeDirection(TransitionDirection direction)
Parameter Type Description
direction TransitionDirection

The TransitionDirection to examine.

Returns

TransitionDirection:

The opposite TransitionDirection of the specified TransitionDirection.

GetOppositeMode(TransitionMode)

Returns the opposite TransitionMode of the specified TransitionMode.

public static TransitionMode GetOppositeMode(TransitionMode mode)
Parameter Type Description
mode TransitionMode

The TransitionMode to examine.

Returns

TransitionMode:

The opposite TransitionMode of the specified TransitionMode.

GetOppositeTransition()

Returns a variation of the transition that can be used for backing out a content that was inserted into the presenter using this transition.

public abstract Transition GetOppositeTransition()

Returns

Transition:

A variation of the transition that can be used for backing out a content that was inserted into the presenter using this transition.

Remarks

Override this method to return an opposite variation of the transition if the transition supports the concept.

If the transition uses a TransitionMode, its value should be flipped using the GetOppositeMode(TransitionMode) method.

GetResolvedDirection(TransitionDirection, TransitionDirection)

Returns a resolved TransitionDirection value between an instance setting and a default setting.

protected static TransitionDirection GetResolvedDirection(TransitionDirection instanceDirection, TransitionDirection defaultDirection)
Parameter Type Description
instanceDirection TransitionDirection

The instance TransitionDirection setting.

defaultDirection TransitionDirection

The default TransitionDirection setting.

Returns

TransitionDirection:

The resolved TransitionDirection value.

OnCompleted(TransitionPresenter, FrameworkElement, Object, FrameworkElement, Object)

Occurs when the transition has completed.

protected virtual void OnCompleted(TransitionPresenter presenter, FrameworkElement fromContent, object fromContentData, FrameworkElement toContent, object toContentData)
Parameter Type Description
presenter TransitionPresenter

The TransitionPresenter that is managing the transition.

fromContent FrameworkElement

The element from which a transition is occurring.

fromContentData Object

Optional data related to the "from" element.

toContent FrameworkElement

The element to which a transition is occurring.

toContentData Object

Optional data related to the "to" element.

Remarks

Place code to perform any post-transition cleanup in an override of this method.

OnStarted(TransitionPresenter, FrameworkElement, FrameworkElement)

Occurs when the transition should be started.

protected virtual void OnStarted(TransitionPresenter presenter, FrameworkElement fromContent, FrameworkElement toContent)
Parameter Type Description
presenter TransitionPresenter

The TransitionPresenter that is managing the transition.

fromContent FrameworkElement

The element from which a transition is occurring.

toContent FrameworkElement

The element to which a transition is occurring.

Remarks

Place code to perform the transition in an override of this method.

Explicit Interface Implementations

ICloneable.Clone()

Creates a new object that is a copy of the current instance.

object ICloneable.Clone()

Returns

Object:

A new object that is a copy of this instance.

Fields

ClipToBoundsProperty

Identifies the ClipToBounds dependency property. This field is read-only.

public static readonly DependencyProperty ClipToBoundsProperty

IsToContentTopMostProperty

Identifies the IsToContentTopMost dependency property. This field is read-only.

public static readonly DependencyProperty IsToContentTopMostProperty

Inherited Members