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
| Public Sub ManipulerArc()
Dim MonArc As New ArcSegment(New Point(80, 90), New Size(20, 20), 0, 1, SweepDirection.Clockwise, 1)
Dim PSC As New PathSegmentCollection
Dim PF As New PathFigure
Dim PFC As New PathFigureCollection
Dim PG As New PathGeometry
Dim MonPath As New System.Windows.Shapes.Path
PSC.Add(MonArc)
PF.StartPoint = New Point(10, 40)
PF.Segments = PSC
PF.IsClosed = False
PFC.Add(PF)
PG.Figures = PFC
MonPath.Data = PG
MonPath.Stroke = Brushes.Red
MonPath.StrokeThickness = 3
Canvas.SetTop(MonPath, 20 * Count)
MonPath.Tag = Me.Count
Me.List.Add(MonPath)
MonCanvas.Children.Add(MonPath)
AddHandler MonPath.MouseDown, AddressOf ChangerRayonArc 'Gestionnaire pour changer par la souris, le Size de l'arc
End Sub |
Partager