TouchPoint touchPoint = e.GetTouchPoint(mywin); p2 = touchPoint.Position; RectangleGeometry rec = new RectangleGeometry(); rec.Rect = new Rect(p1, p2); Path path = new Path(); path.Fill = Brushes.LemonChiffon; path.Stroke = Brushes.Black; path.StrokeThickness = 1; path.Data = rec; canvas1.Children.Add(path);
wpf 绘制矩形
最新推荐文章于 2024-04-16 11:19:03 发布