This is the method I am using for drawing a line on a canvas in WPF that uses the line class set to 1 pixel thick but it actually draws a line that is two pixels thick:
Code: Select all
Line myLine = new Line();
myLine.Stroke = System.Windows.Media.Brushes.Black;
myLine.X1 = 100;
myLine.X2 = 140;
myLine.Y1 = 200;
myLine.Y2 = 200;
myLine.StrokeThickness = 1;
graphSurface.Children.Add(myLine);
I tried:
myLine.StrokeThickness = 0.5;
but that only makes the line burry.
Is there some sort of setting I need to make in the grid instead?