I have been creating a drawing app as a test for WPF, and have been going well. The problem I’ve run into is that if I draw the pixel under the mouse to a bitmap each time it moves, I only get one pixel per update. When the mouse moves around fast it doesn’t draw the pixels in between. I need to know what the best way to draw a line between to pixels is in WPF using WriteableBitmap
EDIT: Now I have this:

If you want to draw a line, you shouldn’t just change colors of one pixel at a time, but rather save position of the mouse in each
MouseMoveevent handling method.Then, you should draw a line between previous position (the one saved from the previous event occurrence) and draw a
Linebetween those two points. This will make the line to be continuous. Information about drawing lines onWriteableBitmapcan be found here: Drawing line using WPF WriteableBitmap.BackBuffer.After drawing the line, don’t forget to update the previous position saved to the current one :).
UPDATE
I’ve also found another solution.
Define XAML with Image you want to draw on:
And then, add code behind with the events handled: