GetCurrentState method

Storyboard.GetCurrentState method

Gets the clock state of the Storyboard.


Public Function GetCurrentState() As ClockState


This method has no parameters.

Return value

Type: ClockState

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


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.

Windows 8 behavior

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. For Windows 8, calling GetCurrentState for a running animation where the running time has not reached the BeginTime always returns ClockState.Stopped. Normally, it's legal to modify a Stopped animation's properties, but in this particular case it's not, so using GetCurrentState to determine whether it's legal to modify the animation is not always accurate. Starting with Windows 8.1, calling GetCurrentState for an animation that's been started by its storyboard always returns ClockState.Active, even if the BeginTime value exists and hasn't been reached. The circumstances in which GetCurrentState returns ClockState.Filling remain the same.

Apps that were compiled for Windows 8 but running on Windows 8.1 continue to use the Windows 8 behavior.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0


Windows::UI::Xaml::Media::Animation [C++]



Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]


Windows::UI::Xaml::Media::Animation [C++]



See also

Storyboarded animations



© 2016 Microsoft