Back to Devexpress

EncryptedFilePasswordCheckFailedEventArgs.TryAgain Property

officefileapi-devexpress-dot-spreadsheet-dot-encryptedfilepasswordcheckfailedeventargs-668e3ea5.md

latest2.6 KB
Original Source

EncryptedFilePasswordCheckFailedEventArgs.TryAgain Property

Gets or sets whether to request a password again.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public bool TryAgain { get; set; }
vb
Public Property TryAgain As Boolean

Property Value

TypeDescription
Boolean

true to repeat the password request; otherwise, false

|

Remarks

If the TryAgain property set to true, the EncryptedFilePasswordRequested event raises. The InvalidFormatException fires if the TryAgain property is not specified or set to false.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TryAgain property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

spreadsheet-document-api-encryption/CS/EncryptionExample/Program.cs#L84

csharp
Console.WriteLine("You did not enter the password!");
e.TryAgain = true;
e.Handled = true;

spreadsheet-document-api-encryption/VB/EncryptionExample/Program.vb#L65

vb
Console.WriteLine("You did not enter the password!")
e.TryAgain = True
e.Handled = True

See Also

EncryptedFilePasswordCheckFailedEventArgs Class

EncryptedFilePasswordCheckFailedEventArgs Members

DevExpress.Spreadsheet Namespace