Timeline.CreateClock Method

Definition

Creates a Clock from this Timeline.

Overloads

CreateClock()

Creates a new, controllable Clock from this Timeline. If this Timeline has children, a tree of clocks is created with this Timeline as the root.

CreateClock(Boolean)

Creates a new Clock from this Timeline and specifies whether the new Clock is controllable. If this Timeline has children, a tree of clocks is created with this Timeline as the root.

CreateClock()

Creates a new, controllable Clock from this Timeline. If this Timeline has children, a tree of clocks is created with this Timeline as the root.

C#
public System.Windows.Media.Animation.Clock CreateClock();

Returns

A new, controllable Clock constructed from this Timeline. If this Timeline is a TimelineGroup that contains child timelines, a tree of Clock objects is created with a controllable Clock created from this Timeline as the root.

Remarks

Although this Timeline may be the child of one or more TimelineGroup objects, this information is ignored: this method treats the current Timeline as a root Timeline.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CreateClock(Boolean)

Creates a new Clock from this Timeline and specifies whether the new Clock is controllable. If this Timeline has children, a tree of clocks is created with this Timeline as the root.

C#
public System.Windows.Media.Animation.Clock CreateClock(bool hasControllableRoot);

Parameters

hasControllableRoot
Boolean

true if the root Clock returned should return a ClockController from its Controller property so that the Clock tree can be interactively controlled; otherwise, false.

Returns

A new Clock constructed from this Timeline. If this Timeline is a TimelineGroup that contains child timelines, a tree of Clock objects is created with a controllable Clock created from this Timeline as the root.

Remarks

Although this Timeline may be the child of one or more TimelineGroup objects, this information is ignored: this method treats the current Timeline as a root Timeline.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10