The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

RichEditDocumentServer.InvalidFormatException Event

Fires when the supplied data could not be recognized as data in the assumed format for import.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v19.2.Core.dll

Declaration

public event RichEditInvalidFormatExceptionEventHandler InvalidFormatException
Public Event InvalidFormatException As RichEditInvalidFormatExceptionEventHandler
public event RichEditInvalidFormatExceptionEventHandler InvalidFormatException
Public Event InvalidFormatException As RichEditInvalidFormatExceptionEventHandler
public event RichEditInvalidFormatExceptionEventHandler InvalidFormatException
Public Event InvalidFormatException As RichEditInvalidFormatExceptionEventHandler

Event Data

The InvalidFormatException event handler receives an argument of the RichEditInvalidFormatExceptionEventArgs type. The following properties provide information specific to this event.

Property Description
Exception Gets the exception which triggers the InvalidFormatException event.

Remarks

Handle the InvalidFormatException event to implement a fallback when there is a risk that corrupted data will be loaded. This event fires after a data check fails for data loaded from a file, from a stream or pasted from the Clipboard.

When you call the RichEditDocumentServer.LoadDocument method, the format of data can be specified explicitly or deduced from the file extension. When a corresponding importer is created, it performs a data check and raises the InvalidFormatException event if it fails.

You can handle the event and perform required actions (inform the end-user) or leave it as is. The event is handled automatically, so no data will be imported and the exception will not propagate further.

See Also