The requested page is not available for the requested platform. You are viewing the content for Default platform.

XRControl.PreviewClick Event

Occurs when the mouse button is clicked while the cursor is hovering over one of the bricks created by the XRControl for its representation in the report preview.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v19.1.dll


public virtual event PreviewMouseEventHandler PreviewClick
Public Overridable Event PreviewClick As PreviewMouseEventHandler

Event Data

The PreviewClick event handler receives an argument of the PreviewMouseEventArgs type. 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 PreviewClick event fires only for Windows Forms applications.

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

The PreviewMouseClick event is raised along with the other events listed below in the following order:


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) {

private void xrLabel2_PreviewDoubleClick(object sender, PreviewMouseEventArgs e) {
See Also