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
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
.NET