Back to Devexpress

MapLineCap.Width Property

windowsforms-devexpress-dot-xtramap-dot-maplinecap-e8e935e9.md

latest3.0 KB
Original Source

MapLineCap.Width Property

Specifies the map line cap width.

Namespace : DevExpress.XtraMap

Assembly : DevExpress.XtraMap.v25.2.dll

NuGet Package : DevExpress.Win.Map

Declaration

csharp
[DefaultValue(10)]
public int Width { get; set; }
vb
<DefaultValue(10)>
Public Property Width As Integer

Property Value

TypeDefaultDescription
Int3210

A value that specifies the map line cap width.

|

Remarks

Use the Width property to define the width of a cap template or a cap arrow. The arrow is displayed when the Template property is not set.

Example

The following example specifies the end cap template and shows the default arrow for the MapLine start cap:

csharp
MapLine line = new MapLine() { Point1 = new GeoPoint(0, 0), 
                               Point2 = new GeoPoint(-10, -30), 
                               StrokeWidth = 2, 
                               Stroke = System.Drawing.Color.Blue };
line.StartLineCap.Visible = true;
line.StartLineCap.Length = 20;
line.StartLineCap.Width = 10;

line.EndLineCap.Visible = true;
line.EndLineCap.Template = new MapUnit[] {
   new MapUnit(-0.5, 0),
   new MapUnit(0, 0.5),
   new MapUnit(0.5, 0),
   new MapUnit(0, -0.5),
};
line.EndLineCap.Length = 10;
line.EndLineCap.Width = 10;

mapItemStorage1.Items.Add(line);
vb
Dim line As MapLine = New MapLine() With {
     .Point1 = New GeoPoint(0, 0),
     .Point2 = New GeoPoint(-10, -30),
     .StrokeWidth = 2,
     .Stroke = Drawing.Color.Blue
}
line.StartLineCap.Visible = True
line.StartLineCap.Length = 20
line.StartLineCap.Width = 10

line.EndLineCap.Visible = True
line.EndLineCap.Template = New MapUnit() {New MapUnit(-0.5, 0),
                                         New MapUnit(0, 0.5), 
                                         New MapUnit(0.5, 0), 
                                         New MapUnit(0, -0.5)}
line.EndLineCap.Length = 10
line.EndLineCap.Width = 10
mapItemStorage1.Items.Add(line)

See Also

MapLineStartCapWidthMapping

MapLineEndCapWidthMapping

MapLineCap Class

MapLineCap Members

DevExpress.XtraMap Namespace