WriteableBitmap.TryLock(Duration) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Tente de verrouiller la bitmap, en attendant qu’elle ne dépasse pas la durée spécifiée.
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
Paramètres
- timeout
- Duration
Qui Duration représente la durée d’attente. La valeur 0 retourne immédiatement. Valeur de Forever blocs indéfiniment.
Retours
true si le verrou a été acquis ; sinon, false.
- Attributs
Exceptions
timeout a la valeur Automatic.
Remarques
Lorsqu’un verrou est acquis, le comportement de la TryLock méthode est identique à la Lock méthode.