officefileapi-devexpress-dot-pdf-dot-pdfpasswordrequestedeventargs-0d256b98.md
Returns the current number of password request attempts.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Core.dll
NuGet Package : DevExpress.Pdf.Core
public int PasswordRequestsCount { get; }
Public ReadOnly Property PasswordRequestsCount As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value that is the current number of password requests.
|
This property can be used, for example, when a developer builds your own custom dialog to protect document opening. The number of password entry attempts can be limited in the custom dialog. The dialog can be closed or an exception can be generated after the number of failed attempts to enter the password is equal to the count returned by the PasswordRequestsCount property.
If the wrong security password is provided using the PdfPasswordRequestedEventArgs.PasswordString property, the PdfViewer.PasswordRequested (PdfDocumentProcessor.PasswordRequested) event is raised the next time with an incremented value of the PasswordRequestsCount property.
To interrupt the password request process, the PdfPasswordRequestedEventArgs.PasswordString property value should be null.
See Also
PdfPasswordRequestedEventArgs Class