Good day.

Someone tell me what to use for drawing in WPF, this way.

Use the mouse to click on the area, thereby setting the points (vertices) for the future polygon, and then it is drawn on them, for example, if the number of points has reached 5, then lines are drawn between them, somehow

    1 answer 1

    Alternatively, it is possible in the event handler of your container at the Mouse Click event to catch the coordinates and save (for example in an array), while performing a check — if you have remembered all 5 (or how many you need) points, then draw a polygon using Graphics.DrawPolygon

    • Is there an event that captures the coordinates? - test19
    • one
      @SOFL, any MouseDown - Grundy