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

XRControl.PreviewDoubleClick Event

Occurs when the left mouse button is double-clicked while the cursor is hovering over one of the bricks created for the control‘s representation in the report preview.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.2.dll

NuGet Package: DevExpress.Reporting.Core

Declaration

public virtual event PreviewMouseEventHandler PreviewDoubleClick

Event Data

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

Property Description
Brick Gets a visual brick that represents this control’s contents on a report page.
MouseButton Provides access to the value that specifies which mouse button has been clicked.
PreviewControl Gets the control which shows the print preview of the report for this event.

The event data class exposes the following methods:

Method Description
GetBrickScreenBounds() Obtains the location and size of the PreviewMouseEventArgs.Brick on the screen.

Remarks

Note

The PreviewDoubleClick event fires only for Windows Forms applications.

Use this event to perform different actions when a control is double-clicked while the report it is located in is being previewed.

Example

This example demonstrates how you can obtain a XRLabel‘s text in print preview, by handling its XRControl.PreviewClick or XRControl.PreviewDoubleClick events.

using System;
using System.Windows.Forms;
using DevExpress.XtraReports.UI;
// ...

private void xrLabel1_PreviewClick(object sender, PreviewMouseEventArgs e) {
    MessageBox.Show(e.Brick.Text);
}

private void xrLabel2_PreviewDoubleClick(object sender, PreviewMouseEventArgs e) {
    MessageBox.Show(e.Brick.Text);
}
See Also