Storyboard.GetCurrentTime Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves the CurrentTime of the Clock that was created for this Storyboard.
Overloads
GetCurrentTime() |
Retrieves the CurrentTime of the Clock that was created for this Storyboard. |
GetCurrentTime(FrameworkContentElement) |
Retrieves the CurrentTime of the Clock that was created for this Storyboard. |
GetCurrentTime(FrameworkElement) |
Retrieves the CurrentTime of the Clock that was created for this Storyboard. |
GetCurrentTime()
Retrieves the CurrentTime of the Clock that was created for this Storyboard.
public:
TimeSpan GetCurrentTime();
public TimeSpan GetCurrentTime ();
member this.GetCurrentTime : unit -> TimeSpan
Public Function GetCurrentTime () As TimeSpan
Returns
null
if this storyboard's clock is Stopped; otherwise, the current time of the storyboard's clock.
Remarks
To use this method to retrieve information about a storyboard's clock, the storyboard must be controllable. To make a storyboard controllable in code, you must use the appropriate overload of the storyboard's Begin method and specify true
to make it controllable. For an example, see How to: Control a Storyboard After It Starts.
See also
Applies to
GetCurrentTime(FrameworkContentElement)
Retrieves the CurrentTime of the Clock that was created for this Storyboard.
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)
Parameters
- containingObject
- FrameworkContentElement
The object specified when the Begin(FrameworkContentElement, Boolean) method was called. This object contains the Clock objects that were created for this storyboard and its children.
Returns
null
if this storyboard's clock is Stopped; otherwise, the current time of the storyboard's clock.
Remarks
To use this method to retrieve information about a storyboard's clock, the storyboard must be controllable. To make a storyboard controllable in code, you must use the appropriate overload of the storyboard's Begin method and specify true
to make it controllable. For an example, see How to: Control a Storyboard After It Starts.
See also
Applies to
GetCurrentTime(FrameworkElement)
Retrieves the CurrentTime of the Clock that was created for this Storyboard.
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)
Parameters
- containingObject
- FrameworkElement
The object specified when the Begin(FrameworkElement, Boolean) method was called. This object contains the Clock objects that were created for this storyboard and its children.
Returns
null
if this storyboard's clock is Stopped; otherwise, the current time of the storyboard's clock.
Remarks
To use this method to retrieve information about a storyboard's clock, the storyboard must be controllable. To make a storyboard controllable in code, you must use the appropriate overload of the storyboard's Begin method and specify true
to make it controllable. For an example, see How to: Control a Storyboard After It Starts.
See also
Applies to
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk