DxSparkline.PrintAsync() Method
Invokes the browser’s Print dialog.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public ValueTask PrintAsync()
Returns
Type | Description |
---|---|
ValueTask | A structure that stores an awaitable result of an asynchronous operation. |
Remarks
The following code snippet opens the Print dialog after a user clicks a custom Print button:
<DxSparkline Data="@DataSource"
@ref=@Sparkline
ArgumentFieldName="Month"
ValueFieldName="VisitorCount"
Height="50px"
Width="200px">
</DxSparkline>
<DxButton Text="Print" Click=Print />
@code {
DxSparkline Sparkline;
async Task Print () {
await Sparkline.PrintAsync();
}
IEnumerable<SparklineDataPoint> DataSource = Enumerable.Empty<SparklineDataPoint>();
protected override void OnInitialized() {
DataSource = GenerateData();
}
}
See Also