Share via


Storyboard.GetCurrentTime 方法

定义

检索为此 CurrentTime 创建的 ClockStoryboard

重载

GetCurrentTime()

检索为此 CurrentTime 创建的 ClockStoryboard

GetCurrentTime(FrameworkContentElement)

检索为此 CurrentTime 创建的 ClockStoryboard

GetCurrentTime(FrameworkElement)

检索为此 CurrentTime 创建的 ClockStoryboard

GetCurrentTime()

检索为此 CurrentTime 创建的 ClockStoryboard

public:
 TimeSpan GetCurrentTime();
public TimeSpan GetCurrentTime ();
member this.GetCurrentTime : unit -> TimeSpan
Public Function GetCurrentTime () As TimeSpan

返回

如果此演示图板的时钟为 Stopped,则为 null;否则为此演示图板的时钟的当前时间。

注解

若要使用此方法检索有关情节提要时钟的信息,情节提要必须是可控的。 若要使情节提要在代码中可控制,必须使用情节提要 Begin 的 方法的适当重载,并指定 true 以使其可控制。 有关示例,请参阅 如何:在情节提要启动后控制情节提要

另请参阅

适用于

GetCurrentTime(FrameworkContentElement)

检索为此 CurrentTime 创建的 ClockStoryboard

public:
 Nullable<TimeSpan> GetCurrentTime(System::Windows::FrameworkContentElement ^ containingObject);
public TimeSpan? GetCurrentTime (System.Windows.FrameworkContentElement containingObject);
member this.GetCurrentTime : System.Windows.FrameworkContentElement -> Nullable<TimeSpan>
Public Function GetCurrentTime (containingObject As FrameworkContentElement) As Nullable(Of TimeSpan)

参数

containingObject
FrameworkContentElement

在调用 Begin(FrameworkContentElement, Boolean) 方法时指定的对象。 此对象包含为此情节提要及其子级创建的 Clock 对象。

返回

如果此演示图板的时钟为 Stopped,则为 null;否则为此演示图板的时钟的当前时间。

注解

若要使用此方法检索有关情节提要时钟的信息,情节提要必须是可控的。 若要使情节提要在代码中可控制,必须使用情节提要 Begin 的 方法的适当重载,并指定 true 以使其可控制。 有关示例,请参阅 如何:在情节提要启动后控制情节提要

另请参阅

适用于

GetCurrentTime(FrameworkElement)

检索为此 CurrentTime 创建的 ClockStoryboard

public:
 Nullable<TimeSpan> GetCurrentTime(System::Windows::FrameworkElement ^ containingObject);
public TimeSpan? GetCurrentTime (System.Windows.FrameworkElement containingObject);
member this.GetCurrentTime : System.Windows.FrameworkElement -> Nullable<TimeSpan>
Public Function GetCurrentTime (containingObject As FrameworkElement) As Nullable(Of TimeSpan)

参数

containingObject
FrameworkElement

在调用 Begin(FrameworkElement, Boolean) 方法时指定的对象。 此对象包含为此情节提要及其子级创建的 Clock 对象。

返回

如果此演示图板的时钟为 Stopped,则为 null;否则为此演示图板的时钟的当前时间。

注解

若要使用此方法检索有关情节提要时钟的信息,情节提要必须是可控的。 若要使情节提要在代码中可控制,必须使用情节提要 Begin 的 方法的适当重载,并指定 true 以使其可控制。 有关示例,请参阅 如何:在情节提要启动后控制情节提要

另请参阅

适用于