Try for Line
set UseLayoutRounding="True"
:
Gets or sets a value that determines whether rendering for the object and its visual subtree should use rounding behavior that aligns rendering to whole pixels.
Example
<Line UseLayoutRounding="True"
X1="5" X2="5000" ... />
Output
UseLayoutRounding="False"
UseLayoutRounding="True"
In this case, UseLayoutRounding
makes one pixel line in the middle. If you want the Line
to be crossed out text, then you need to swap the TextBox and Line, but also in this case you need to use UseLayoutRounding="True"
.