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
Spolupráca s nami v službe GitHub
Zdroj tohto obsahu nájdete v službe GitHub, kde môžete vytvárať a skúmať problémy a žiadosti o prijatie zmien. Ďalšie informácie nájdete v našom sprievodcovi prispievateľom.