.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfPasswordRequestedEventArgs.PasswordRequestsCount Property

Returns the current number of password request attempts.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v20.1.Core.dll

Declaration

public int PasswordRequestsCount { get; }
Public ReadOnly Property PasswordRequestsCount As Integer

Property Value

Type Description
Int32

An integer value that is the current number of password requests.

Remarks

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