DxExportSettings Class
Contains the target component’s export and print settings.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
public class DxExportSettings :
DxSettingsComponent<ExportSettingsModel>
Remarks
Use DxExportSettings
object to configure export and print settings of the following components:
- DxBarGauge
- A component that visualizes data as circular bars where each bar indicates a single value.
- DxSankey
- A component that depicts value flow between two entity sets.
Add a DxExportSettings
object to target component markup and set the DxExportSettings.Enabled property to true
to enable client-side export and printing functionality – the component displays the Export hamburger menu with export and print commands.
You can use the following properties of the DxExportSettings
component to define the list of commands in the Export hamburger menu:
- PrintingEnabled
- Set this property to
true
to display the Print command. - Formats
- Assign DataExportFormat values to this property to display corresponding commands.
You can also configure the following settings of the exported file:
- FileName
- Specifies the file name.
- BackgroundColor | Margin
- Specifies file appearance and layout.
Example
The following code snippet customizes the Export hamburger menu in the DxBarGauge component and specifies the name of the exported file:
<DxBarGauge Width="100%"
Height="500px"
StartValue="-5"
EndValue="5"
BaseValue="0"
Values="@Values">
<DxExportSettings Enabled="true" FileName="My file" Formats="@exportFormats"/>
@* ... *@
</DxBarGauge>
@code {
DataExportFormat[] exportFormats = new DataExportFormat[] {
DataExportFormat.Png,
DataExportFormat.Pdf};
double[] Values = new double[] { -2.13, 1.48, -3.09, 4.52, 4.9, 3.9 };
// ...
}