Misaligned vertical lines

I’m developing a simple calendar control as Container Control.
It consists of 2 arrays of controls on a Canvas in Container Control. I use vertical lines. In the IDE these lines are aligned pixel perfect.
Behind the controls is a Canvas for a gradient effect.

But when running in the debugger or as build the lines go haywire.

How come?

Seems like the background canvas has moved top-left and together with it the lines (which are embedded)
Are you sure the canvas is not moving.

Btw, I’d design the line on the paint of the canvas. In the end it would probably behave better in any case.