At the top of your OnRender, add this:
this.SetValue(RenderOptions.EdgeModeProperty, EdgeMode.Aliased);
Or, change your xaml to this:
<Views:TestRender Margin="0,65,671,0" RenderOptions.EdgeMode="Aliased" />
Or, you could try drawing overlapping rectangles:
//drawingContext.DrawLine(pen, new Point(0, pixel), new Point(ActualWidth, pixel));
drawingContext.DrawRectangle(brush, pen, new Rect(new Point(0, pixel - 0.25), new Point(ActualWidth, pixel + 0.25)));