//虚线
DoubleCollection dc = new DoubleCollection();
dc.Add(2);
DashStyle dashstyle = new DashStyle();
dashstyle.Dashes = dc;
Pen renderPen = new Pen(new SolidColorBrush(Colors.Navy), 1.5);
renderPen.DashStyle = dashstyle;
renderPen.DashCap = PenLineCap.Round;