Back to Devexpress

RulerAppearance.StrokeStyle Property

wpf-devexpress-dot-xpf-dot-map-dot-rulerappearance.md

latest2.8 KB
Original Source

RulerAppearance.StrokeStyle Property

Specifies parameters of the stroke line used to draw a ruler.

Namespace : DevExpress.Xpf.Map

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

NuGet Package : DevExpress.Wpf.Map

Declaration

csharp
public StrokeStyle StrokeStyle { get; set; }
vb
Public Property StrokeStyle As StrokeStyle

Property Value

TypeDescription
StrokeStyle

Contains parameters of the stroke line used to draw a ruler.

|

Remarks

The following example creates an area ruler and uses an instance of the RulerAppearance class to specify the ruler’s fill color, opacity, outline color, and outline width:

csharp
RulerAppearance rulerStyle = new RulerAppearance();
rulerStyle.AreaOpacity = 0.7;
rulerStyle.Fill = Brushes.CornflowerBlue;
rulerStyle.Stroke = Brushes.DarkBlue;
rulerStyle.StrokeStyle =new StrokeStyle() { Thickness = 3 };
MapRuler ruler = mapControl1.Measurements.CreateRuler(RulerType.Area, 
                                                      new List<CoordPoint>() { new GeoPoint(10, 0), 
                                                                               new GeoPoint(20, 0),
                                                                               new GeoPoint(20, 10)}, 
                                                      rulerStyle);
vb
Dim rulerStyle As RulerAppearance = New RulerAppearance()
rulerStyle.AreaOpacity = 0.7
rulerStyle.Fill = Brushes.CornflowerBlue
rulerStyle.Stroke = Brushes.DarkBlue
rulerStyle.StrokeWidth = 3
rulerStyle.StrokeStyle = New StrokeStyle() With {
            .Thickness = 3
}

Dim ruler As MapRuler = mapControl1.Measurements.CreateRuler(RulerType.Area, 
                                                             New List(Of CoordPoint)() From { New GeoPoint(10, 0),
                                                                                              New GeoPoint(20, 0),
                                                                                              New GeoPoint(20, 10)},
                                                             rulerStyle)

See Also

RulerAppearance Class

RulerAppearance Members

DevExpress.Xpf.Map Namespace