Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DiagramAppearanceObject.BorderDashPattern Property

Gets or sets a collection of System.Double values that indicate the pattern of dashes and gaps that is used to outline diagram items.

Namespace: DevExpress.XtraDiagram

Assembly: DevExpress.XtraDiagram.v24.2.dll

NuGet Package: DevExpress.Win.Diagram

#Declaration

public DiagramDoubleCollection BorderDashPattern { get; set; }

#Property Value

Type Default Description
DevExpress.Diagram.Core.DiagramDoubleCollection *null*

A collection of System.Double values that specify the pattern of dashes and gaps.

#Remarks

Each value in the collection specifies the length of a dash or gap relative to the BorderSize property value. For example, a value of 1 creates a dash or gap that has the same length as the border thickness.

The first item in the collection located at index 0 specifies the length of a dash. The second item located at index 1 specifies the length of a gap. Objects with an even index value specify dashes; objects with an odd index value specify gaps.

The code snippet below illustrates how to set a dashed border for a diagram shape.

item.Appearance.BorderDashPattern = new DevExpress.Diagram.Core.DiagramDoubleCollection(new double[] { 10, 3 });
item.Appearance.BorderColor = Color.Red;
item.Appearance.BorderSize = 4;
See Also