Back to Devexpress

LineStyle Class

wpf-devexpress-dot-xpf-dot-charts-36829868.md

latest5.9 KB
Original Source

LineStyle Class

Defines line style settings for various chart elements.

Namespace : DevExpress.Xpf.Charts

Assembly : DevExpress.Xpf.Charts.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public class LineStyle :
    ChartDependencyObject,
    IXtraSupportDeserializeCollection,
    ICloneable
vb
Public Class LineStyle
    Inherits ChartDependencyObject
    Implements IXtraSupportDeserializeCollection,
               ICloneable

The following members return LineStyle objects:

Show 27 links

Remarks

The LineStyle class contains settings that define the line style of various elements within a chart control (such as ConstantLine or LineSeries2D).

An object of the LineStyle type can be accessed via the ConstantLine.LineStyle or LineSeries2D.LineStyle property of the corresponding element.

Example

This example shows how to configure a line’s drawing style using the LineStyle class options.

You can use the following properties to modify a line:

PropertyDescription
LineStyle.ThicknessGets or sets the line’s thickness.
LineStyle.DashCapSpecifies the line end’s shape.
LineStyle.LineJoinGets or sets how line segments are joined.
LineStyle.MiterLimitSpecifies the limit on the ratio of the miter length to half this line’s thickness.
LineStyle.DashStyleGets or sets a sequence of dashes and gaps that is used to draw a line.

The following code shows how to apply line style settings to a line series:

xaml
<dxc:LineSeries2D>
    <dxc:LineSeries2D.LineStyle>
        <dxc:LineStyle Thickness="2"
                       DashCap="Flat" 
                       LineJoin="Miter"
                       MiterLimit="10">
            <dxc:LineStyle.DashStyle>
                <DashStyle Dashes="2 1 5 1"/>
            </dxc:LineStyle.DashStyle>
        </dxc:LineStyle>
    </dxc:LineSeries2D.LineStyle>
    <!-- Other series settings. -->
</dxc:LineSeries2D>

Inheritance

Object DispatcherObject DependencyObject Freezable ChartDependencyObject LineStyle

See Also

LineStyle Members

DevExpress.Xpf.Charts Namespace