Back to Devexpress

XRGaugeDashboardItem Class

dashboard-devexpress-dot-dashboardcommon-0337c8ab.md

latest3.3 KB
Original Source

XRGaugeDashboardItem Class

A panel that represents a Gauge dashboard item in the exported document.

Namespace : DevExpress.DashboardCommon

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

NuGet Package : DevExpress.Dashboard.Core

Declaration

csharp
public class XRGaugeDashboardItem :
    XRDashboardItemPanel
vb
Public Class XRGaugeDashboardItem
    Inherits XRDashboardItemPanel

Remarks

When you handle the IDashboardControl.CustomExport event, call the CustomExportEventArgs.GetPrintableControls/CustomExportEventArgs.GetPrintableControl(String) method to get XRGaugeDashboardItem that is a printable control corresponding to a Gauge item. Use the XRGaugeDashboardItem.Gauges property to get printable gauges (a collection of the XRDashboardGauge objects).

The following code snippet illustrates how to get XRGaugeDashboardItem and customize printable gauges.

csharp
foreach(KeyValuePair<string, XRControl> printableControl in e.GetPrintableControls()) {
    XRGaugeDashboardItem xrGaugeDashboardItem = printableControl.Value as XRGaugeDashboardItem;
    if(xrGaugeDashboardItem != null) {
        foreach(XRDashboardGauge xrDashboardGauge in xrGaugeDashboardItem.Gauges) {
            xrDashboardGauge.MainSeriesLabel.ForeColor = Color.Red;
            xrDashboardGauge.SecondarySeriesLabel.ForeColor = Color.Red;
        }
    }
 }
vb
For Each printableControl As KeyValuePair(Of String, XRControl) In e.GetPrintableControls()
    Dim xrGaugeDashboardItem As XRGaugeDashboardItem = TryCast(printableControl.Value, XRGaugeDashboardItem)
    If xrGaugeDashboardItem IsNot Nothing Then
        For Each xrDashboardGauge As XRDashboardGauge In xrGaugeDashboardItem.Gauges
            xrDashboardGauge.MainSeriesLabel.ForeColor = Color.Red
            xrDashboardGauge.SecondarySeriesLabel.ForeColor = Color.Red
        Next xrDashboardGauge
    End If
 Next printableControl

Inheritance

Object MarshalByRefObject Component XRControl XRPanel XRDashboardItemPanel XRGaugeDashboardItem

See Also

XRGaugeDashboardItem Members

DevExpress.DashboardCommon Namespace