All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

Range.SideMarginSizeUnit Property

Specifies the measurement unit for diagram side margins.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v20.1.dll

Declaration

public SideMarginSizeUnit SideMarginSizeUnit { get; set; }
Public Property SideMarginSizeUnit As SideMarginSizeUnit

Property Value

Type Description
SideMarginSizeUnit

A SideMarginSizeUnit enumeration value.

Remarks

Use the SideMarginSizeUnit property to specify measurement units for the Range.SideMarginsValue, Range.StartSideMargin, and Range.EndSideMargin properties' values.

Example

This example demonstrates how to specify diagram side margins as a percentage:

Use the following code to set side margins in markup:

<dxc:ChartControl ... >
    <dxc:XYDiagram2D>
        <dxc:XYDiagram2D.AxisX>
            <dxc:AxisX2D ...>
                <dxc:AxisX2D.WholeRange>
                    <dxc:Range StartSideMargin="20" EndSideMargin="0"
                               SideMarginSizeUnit="AxisRangePercentage"/>
                </dxc:AxisX2D.WholeRange>
            </dxc:AxisX2D>
        </dxc:XYDiagram2D.AxisX>
    </dxc:XYDiagram2D>
    ...
</dxc:ChartControl>

The code below shows how to specify margins at runtime:

Range range = new Range();
xAxis.WholeRange = range;
range.SideMarginSizeUnit = SideMarginSizeUnit.AxisRangePercentage;
range.StartSideMargin = 20;
range.EndSideMargin = 0;

Related API members:

Member

Description

Range.SideMarginSizeUnit

Sets the measurement unit for side margins.

Range.StartSideMargin

Specifies the left margin.

Range.EndSideMargin

Specifies the right margin.

See Also