Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V24.1

DxMarginSettings Class

Contains settings for the element’s margins.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

Declaration

public class DxMarginSettings :
    DxSettingsComponent<MarginSettingsModel>

Remarks

Use DxMarginSettings objects to customize margin settings for the following components:

DxSparkline
A component that visualizes value trends as an inline graph.
DxBarGauge
A component that visualizes data as circular bars where each bar indicates a single value.
DxBarGaugeLegendSettings
Contains settings for the Bar Gauge‘s legend.
DxLegendTitleSettings
Contains settings for the legend title.
DxTitleSettings
Contains title settings.

The DxMarginSettings component allows you to configure Top, Right, Bottom, and Left margins.

Example

The following code snippet sets margins for DxSparkline:

Sparkline - Size and Margins

<DxSparkline Data="@DataSource"
             CssClass="myCssClass"
             Type="SparklineType.Bar"
             ArgumentFieldName="Month"
             ValueFieldName="VisitorCount"
             Height="50px"
             Width="200px">
    <DxMarginSettings Top="10" Right="20" Bottom="10" Left="20"/>
</DxSparkline>

@code {
    IEnumerable<SparklineDataPoint> DataSource = Enumerable.Empty<SparklineDataPoint>();
    protected override void OnInitialized() {
        DataSource = GenerateData();
    }
}

Inheritance

Object
ComponentBase
DxSettingsComponent<DevExpress.Blazor.ClientComponents.Internal.MarginSettingsModel>
DxMarginSettings
See Also