WriteableBitmap.TryLock(Duration) 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.
Attempts to lock the bitmap, waiting for no longer than the specified length of time.
public:
bool TryLock(System::Windows::Duration timeout);
[System.Security.SecurityCritical]
public bool TryLock (System.Windows.Duration timeout);
public bool TryLock (System.Windows.Duration timeout);
[<System.Security.SecurityCritical>]
member this.TryLock : System.Windows.Duration -> bool
member this.TryLock : System.Windows.Duration -> bool
Public Function TryLock (timeout As Duration) As Boolean
Parameters
- timeout
- Duration
A Duration that represents the length of time to wait. A value of 0 returns immediately. A value of Forever blocks indefinitely.
Returns
true
if the lock was acquired; otherwise, false
.
- Attributes
Exceptions
timeout
is set to Automatic.
Remarks
When a lock is acquired, the behavior of the TryLock method is the same as the Lock method.
Applies to
See also
Tee yhteistyötä kanssamme GitHubissa
Tämän sisällön lähde on GitHubissa, jossa voit myös luoda ja tarkastella ongelmia ja pull-pyyntöjä. Katso lisätietoja osallistujan oppaasta.