WPF, C#: Draw a line onto existing bitmap in image control
问题 I have a bitmap image in an image control I need to draw a red line on the bitmap each time I click with the mouse onto it, at the place where I clicked the mouse. I first thought of creating a Line object, but found out, that I cannot add the Line. I would need a canvas. But if I put my image in a canvas, my bitmap does not stretch over the whole canvas (I found out, that the coordinates of the bitmap determine the place on the canvas, so my bitmap is wrongly displayed.) Then I tried using