Udostępnij za pośrednictwem


VisualTransition.Storyboard Property

Definition

Gets or sets the Storyboard that runs when the transition occurs.

public:
 property Storyboard ^ Storyboard { Storyboard ^ get(); void set(Storyboard ^ value); };
Storyboard Storyboard();

void Storyboard(Storyboard value);
public Storyboard Storyboard { get; set; }
var storyboard = visualTransition.storyboard;
visualTransition.storyboard = storyboard;
Public Property Storyboard As Storyboard
<VisualTransition>
  singleStoryboard
</VisualTransition>

Property Value

The Storyboard that occurs when the transition occurs.

Remarks

The value of the Storyboard property is either null or a single Storyboard object. A Storyboard is like a container for animations, it can contain one or more animation definitions. Each such animation can target a specific dependency property on a specific named target. The named target must be an element in the control template that has a Name or x:Name attribute value defined in the template itself. The dependency property must be a property that exists in that object's object model, or must be an attached property. To target animations, you use the Storyboard.TargetName and Storyboard.TargetProperty attached properties. For more info on how to define animations with XAML syntax, and the types of animations you can use, see Storyboarded animations.

The properties you target using animations in VisualTransition.Storyboard are not limited toPoint, Color, or Double. You can use ObjectAnimationUsingKeyFrames and DiscreteObjectKeyFrame.

If you have a value for Storyboard, you can choose to omit a value for GeneratedDuration. Instead, set specific Duration values on the animations in the Storyboard or the main Storyboard element within it. If you do set a GeneratedDuration value, it won't truncate or change any Storyboard with a Duration value; the total length of the transition is the longest Duration value that you've set in the animations for Storyboard, or the GeneratedDuration, whichever is longer.

Implicit transitions

You can define a VisualTransition such that it has a GeneratedDuration, but does not have a Storyboard value. This creates an implicit transition that can interpolate values that are different between two states. For more info, see GeneratedDuration.

Applies to

See also