Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Window_MouseDown(object sender, MouseButtonEventArgs e)
- {
- Point point = PointToScreen(Mouse.GetPosition(this));
- RisuemPryamougolnik(point.X, point.Y);
- }
- private void RisuemPryamougolnik(double x,double y)
- {
- Rectangle rect = new Rectangle();
- rect.Height = 50;
- rect.Width = 50;
- // rect.Fill = Brushes.Aqua;
- rect.Stroke = Brushes.Aqua;
- rect.StrokeThickness = 1;
- canvas.Children.Add(rect);
- Canvas.SetLeft(rect, x);
- Canvas.SetTop(rect, y);
- }
Add Comment
Please, Sign In to add comment