DurationHelper Class
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.
public ref class DurationHelper sealed
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class DurationHelper final
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class DurationHelper
Public NotInheritable Class DurationHelper
- Inheritance
- Attributes
Remarks
Duration is a Windows Runtime structure that represents a unit of time for an animation behavior. For example, Timeline.Duration uses a Duration value.
DurationHelper
is one of several Helper classes that are intended to provide utility methods for Windows Runtime structure values. C# and Microsoft Visual Basic code can use members of Duration instead, because utility members are available directly on the structure due to .NET runtime support. C++ code can only access the Timespan
data value on Duration. For C++ developers, approximately the same utility features that a Microsoft Visual Basic developer could use directly on Duration are available in a static form on the DurationHelper
class.
Properties
Automatic |
Returns a generated Duration value that indicates an "Automatic" Duration. C# and Microsoft Visual Basic code should use Duration.Automatic instead. |
Forever |
Returns a generated Duration value that indicates a "Forever" Duration. C# and Microsoft Visual Basic code should use Duration.Forever instead. |
Methods
Add(Duration, Duration) |
Adds the |
Compare(Duration, Duration) |
Compares value equality of two Duration structures. C# and Microsoft Visual Basic code should use Duration.Compare instead. |
Equals(Duration, Duration) |
Determines whether two Duration values have equivalent values. C# and Microsoft Visual Basic code should use the Equality (=) operator or Duration.Equals method instead. |
FromTimeSpan(TimeSpan) |
Creates a new Duration based on a TimeSpan value. C# and Microsoft Visual Basic code should use the Duration(TimeSpan) constructor instead. |
GetHasTimeSpan(Duration) |
Returns whether the |
Subtract(Duration, Duration) |
Subtracts the |