void Mediaelement1_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { checkPoints.Add(Mouse.GetPosition(mediaelement1)); }
SolidColorBrush bgBrush = new SolidColorBrush(); bgBrush.Color = Colors.Transparent; SolidColorBrush borderBrush = new SolidColorBrush(); borderBrush.Color = Colors.Black; Path polyPath = new Path(); polyPath.Stroke = borderBrush; polyPath.StrokeThickness = 1; polyPath.Fill = bgBrush; GeometryGroup polyGeometryGroup = new GeometryGroup(); PathFigure pLineFigure = new PathFigure(); PolyQuadraticBezierSegment PQSegment=new PolyQuadraticBezierSegment (); foreach(var itr in checkPoints) { PQSegment.Points.Add(itr); } PQSegment.Points.Add( checkPoints[0]); Point startPoint= checkPoints[0]; pLineFigure.StartPoint = new Point(startPoint.X,startPoint.Y); pLineFigure.Segments.Add( PQSegment); PathGeometry pGeometry = new PathGeometry(); pGeometry.Figures.Add(pLineFigure); polyGeometryGroup.Children.Add(pGeometry); polyPath.Data = polyGeometryGroup; this .mediasp.Children.Add (polyPath); checkPoints.Clear(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)