Implicit Operator

Duration.Implicit Operator

Implicitly creates a Duration from a given TimeSpan.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)

public static implicit operator Duration (
	TimeSpan timeSpan
)
You cannot use methods in XAML.

Parameters

timeSpan
Type: System.TimeSpan

TimeSpan from which an instance of Duration is implicitly created.

Return Value

Type: System.Windows.Duration
A new instance of Duration.

ExceptionCondition
ArgumentException

Occurs when TimeSpan is negative.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0

Community Additions

ADD
Show:
© 2016 Microsoft