Skip to main content
A newer version of this page is available. .

PrintingSystemBase.ResetProgressReflector() Method

Resets all settings of the printing system’s PrintingSystemBase.ProgressReflector.

Namespace: DevExpress.XtraPrinting

Assembly: DevExpress.Printing.v18.2.Core.dll

Declaration

public void ResetProgressReflector()

Remarks

Call the ResetProgressReflector method after you’ve finished working with the PrintingSystemBase.ProgressReflector.

Note

The ProgressReflector class is intended to be used only with documents created with the XtraReports Suite.

Example

This example illustrates how to use the ProgressReflector class (this class is intended to be used only with the documents created with the XtraReports Suite).

The following code invokes a form that contains the ProgressBarControl showing the document generation status. When the document creation is complete, the Progress Bar is hidden and the form shows a print preview.

Tip

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E906.

using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraPrinting;
using DevExpress.XtraPrinting.Native;
// ...

private void Form1_Load(object sender, EventArgs e) {
    // Create a report and make it
    // a document source of the document viewer.
    report = new XtraReport1();
    documentViewer1.DocumentSource = report;

    // Create a form to show a progress bar,
    // and adjust its properties.
    Form form = new Form() {
        FormBorderStyle = FormBorderStyle.None,
        Size = new System.Drawing.Size(300, 25),
        ShowInTaskbar = false,
        StartPosition = FormStartPosition.CenterScreen,
        TopMost = true
    };

    // Create a ProgressBar along with its ReflectorBar.
    ProgressBarControl progressBar = new ProgressBarControl();
    ReflectorBar reflectorBar = new ReflectorBar(progressBar);

    // Add a progress bar to a form and show it.
    form.Controls.Add(progressBar);
    progressBar.Dock = DockStyle.Fill;
    form.Show();

    try {
        // Register the reflector bar, so that it reflects
        // the state of a ProgressReflector.
        report.PrintingSystem.ProgressReflector = reflectorBar;
        report.CreateDocument();
    }
    finally {
        // Unregister the reflector bar, so that it no longer
        // reflects the state of a ProgressReflector.
        report.PrintingSystem.ResetProgressReflector();
        form.Close();
        form.Dispose();
    }
}

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

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.

See Also