Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RichEditControl.DecryptionFailed Event

Occurs if the RichEditControl failed to open an encrypted file.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v24.2.dll

NuGet Package: DevExpress.Win.RichEdit

#Declaration

public event DecryptionFailedEventHandler DecryptionFailed

#Event Data

The DecryptionFailed event's data class is DecryptionFailedEventArgs. The following properties provide information specific to this event:

Property Description
Exception Returns an exception that led to the event.

#Remarks

The DecryptionFailed event is raised when the RichEditDocumentServer cannot decrypt a loaded file. Check the Exception property to determine the exception that led to this event.

The event also occurs if the EncryptedFilePasswordCheckFailedEventArgs.TryAgain property is not specified or set to false.

If the event is not handled, the RichEditControl does not load an empty file.

The code sample below shows how to handle the DecryptionFailed event to show an exception message.

private void RichEditControl1_DecryptionFailed(object sender, DecryptionFailedEventArgs e)
{
    MessageBox.Show(e.Exception.Message.ToString(), "Exception");
}
See Also