Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GaugeBase.Rendered Event

In This Article

Fires after the gauge component is rendered.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback Rendered { get; set; }

#Remarks

Handle the Rendered event to track the moment when gauge rendering is finished and the component is completely loaded.

The following code snippet displays a custom Export to PDF button that exports bar gauge data to a PDF file. The button appears after the component is completely loaded. For demo purposes, the example imitates a time-consuming operation.

Bar Gauge - Export Data

Razor
<DxBarGauge Width="50%"
            Height="50%"
            StartValue="-5"
            EndValue="5"
            BaseValue="0"
            @ref=@BarGauge
            Values="@Values"
            Rendered="@BarGaugeRendered">
    @* ... *@
</DxBarGauge>

<DxButton Text="Export to PDF" Visible="@buttonVisible" Click="@ExportToPdf" />

@code {
    bool buttonVisible;
    DxBarGauge BarGauge;

    async Task ExportToPdf () {
        await BarGauge.ExportToAsync("Custom file", DataExportFormat.Pdf);
    }

    async Task BarGaugeRendered() {
        await Task.Delay(2000);
        buttonVisible = true;
    }
    double[] Values = new double[] { -2.13, 1.48, -3.09, 4.52, 4.9, 3.9 };
    // ...
}
See Also