Back to Devexpress

RichEditControl.MailMergeStarted Event

wpf-devexpress-dot-xpf-dot-richedit-dot-richeditcontrol-096c00e3.md

latest4.7 KB
Original Source

RichEditControl.MailMergeStarted Event

Fires before mail merge starts.

Namespace : DevExpress.Xpf.RichEdit

Assembly : DevExpress.Xpf.RichEdit.v25.2.dll

NuGet Package : DevExpress.Wpf.RichEdit

Declaration

csharp
public event MailMergeStartedEventHandler MailMergeStarted
vb
Public Event MailMergeStarted As MailMergeStartedEventHandler

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
DocumentGets a merged document.
OperationDescriptionSpecifies the text displayed by the progress indicator while the document is being rendered.

Remarks

You can handle this event to inform the user that a mail merge has started.

The following code snippet shows how to use the MailMergeStarted event to register a custom service that updates a progress indicator on the form.

View Example

csharp
using DevExpress.Services;
using System.Drawing;

private void richEditControl1_MailMergeStarted(object sender, MailMergeStartedEventArgs e) {

    richEditControl1.RemoveService(typeof(IProgressIndicationService));
    richEditControl1.AddService(typeof(IProgressIndicationService),
    new MyProgressIndicatorService(richEditControl1, this.progressBarControl1));
}
vb
Imports DevExpress.Services
Imports System.Drawing

Private Sub richEditControl1_MailMergeStarted(ByVal sender As Object, ByVal e As MailMergeStartedEventArgs)
    richEditControl1.RemoveService(GetType(IProgressIndicationService))
    richEditControl1.AddService(GetType(IProgressIndicationService), New MyProgressIndicatorService(richEditControl1, Me.progressBarControl1))
End Sub

The following code snippets (auto-collected from DevExpress Examples) contain references to the MailMergeStarted event.

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.

dxrichedit-for-wpf-how-to-implement-progress-indicator/CS/MainWindow.xaml#L19

xml
<dx:DXTabItem Header="Template">
    <dxre:RichEditControl Name="richEditControl1" Loaded="richEditControl1_Loaded" MailMergeStarted="richEditControl1_MailMergeStarted" MailMergeFinished="richEditControl1_MailMergeFinished" MailMergeRecordStarted="richEditControl1_MailMergeRecordStarted" MailMergeRecordFinished="richEditControl1_MailMergeRecordFinished" />
</dx:DXTabItem>

wpf-richedit-use-docvariable-fields/CS/MainWindow.xaml#L23

xml
<dx:DXTabItem Header="Template">
    <dxre:RichEditControl Name="richEditControl1" Loaded="richEditControl1_Loaded" MailMergeStarted="richEditControl1_MailMergeStarted" MailMergeFinished="richEditControl1_MailMergeFinished" MailMergeRecordStarted="richEditControl1_MailMergeRecordStarted" MailMergeRecordFinished="richEditControl1_MailMergeRecordFinished" />
</dx:DXTabItem>

See Also

RichEditControl Class

RichEditControl Members

DevExpress.Xpf.RichEdit Namespace