All docs
V20.2
21.1 (EAP/Beta)
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

GaugeExportContext Class

Provides a connection between data item containers from the Gauges section and underlying control's gauges during export.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v20.2.Core.dll

Declaration

public class GaugeExportContext :
    ControlContext

Remarks

Use the XRDashboardGauge object to customize the printable gauges.

The following image illustrates elements of the printable gauge:

Example

The following example illustrates how to customize the Gauge dashboard item in the exported document when you handle the DashboardDesigner.CustomExport / DashboardViewer.CustomExport events. You can use the CustomExportEventArgs.GetPrintableControls method to obtained the printable controls.

using DevExpress.DashboardCommon;
using DevExpress.DashboardWin;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;

private void DashboardControl_CustomExport(object sender, CustomExportEventArgs e) {
  foreach(var printControl in e.GetPrintableControls()) {
    if(printControl.Value is XRGaugeDashboardItem) {
      var gaugeItemName = printControl.Key;
      DashboardDesigner designer = (DashboardDesigner)sender;
      var gaugeDashboardItem = designer.Dashboard.Items[gaugeItemName] as GaugeDashboardItem;
      foreach(var dashGaugeElement in gaugeDashboardItem.Gauges) {
        foreach(var gaugePanel in e.GetGaugeContext(gaugeItemName).GetPrintableGauges(dashGaugeElement).Cast<XRDashboardGauge>()) {
          if(gaugePanel != null) {
              gaugePanel.MainSeriesLabel.ForeColor = Color.Red;
          }
        }
      }
    }
  }
}

Inheritance

Object
ControlContext
GaugeExportContext
See Also