ZedGraph vertical lines with LineObj issue
I have a ZedGraphControl with a few curves in it and I want to add vertical lines at some fixed x-positions. The lines should of course only be inside the actual graph area. I tried following LineObj line = new LineObj(Color.Black, xPos, myPane.YAxis.Scale.Min, xPos, myPane.YAxis.Scale.Max); line.Line.Style = System.Drawing.Drawing2D.DashStyle.Dash; line.Line.Width = 1f; myPane.GraphObjList.Add(line); and this works fine until the user zooms the graph, the vertical lines will then stretch out of the actual graph area (see pic link below, also notice that it is not dashed inside the graph, odd)