Share via


Storyboard.GetCurrentState Method

Definition

Gets the clock state of the Storyboard.

public:
 virtual ClockState GetCurrentState() = GetCurrentState;
ClockState GetCurrentState();
public ClockState GetCurrentState();
function getCurrentState()
Public Function GetCurrentState () As ClockState

Returns

One of the enumeration values. Can be: Active, Filling, or Stopped.

Remarks

This method is useful if you want to modify an animation's properties at runtime, before the animation is started. An animation that is stopped (GetCurrentState returns ClockState.Stopped) can still be modified. An animation that is running (GetCurrentState returns either ClockState.Active or ClockState.Filling) cannot be modified, and you'll get an error if you try.

An animation can have an optional BeginTime value, which modifies when the animation actually starts to affect values compared to when the controlling storyboard is started. Even if the running time has not reached the BeginTime yet, it's illegal to modify the properties of the animation once the storyboard starts it.

Applies to

See also