I use ui_canvas. In it I draw line that will change the position.
Line myLine = new Line();
myLine.Stroke = System.Windows.Media.Brush
myLine.X1 = 0;
myLine.Y1 = CurHor;
myLine.Y2 = CurHor;
myLine.VerticalAlignment = VerticalAlignment.Center;
myLine.StrokeThickness = 2;
myLine = null;
But I cannot refresh view and all lines that was drawing for another values of CurHor are in the ui_canvas. Please see the attached picture.
What can I do to show only the line in current position?