D3DImage.TryLock Method (Duration)

 

Attempts to lock the D3DImage and waits for the specified duration.

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

public bool TryLock(
	Duration timeout
)

Parameters

timeout
Type: System.Windows.Duration

The duration to wait for the lock to be acquired.

Return Value

Type: System.Boolean

true if the lock was acquired; otherwise, false.

Exception Condition
ArgumentOutOfRangeException

timeout is set to Automatic.

InvalidOperationException

The lock count equals MaxValue.

.NET Framework
Available since 3.0
Return to top
Show: