1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Dim p As New Path
Dim blackBrush As New SolidColorBrush()
blackBrush.Color = Colors.Black
Dim LG As New LineGeometry
LG.StartPoint = New Point(20, 30)
LG.EndPoint = New Point(70, 200)
Dim L2G As New LineGeometry
L2G.StartPoint = New Point(70, 200)
L2G.EndPoint = New Point(150, 300)
Dim L3G As New LineGeometry
L3G.StartPoint = New Point(150, 300)
L3G.EndPoint = New Point(20, 30)
Dim GG As New GeometryGroup
GG.Children.Add(LG)
GG.Children.Add(L2G)
GG.Children.Add(L3G)
p.Data = GG
p.Stroke = blackBrush
p.StrokeThickness = 1
p.Fill = blackBrush
LayoutRoot.Children.Add(p) |