drawingcontext

How to draw multiple lines with different z index in c# wpf application

梦想与她 提交于 2019-11-28 11:15:05
问题 I am using DrawingContext.DrawLine function to draw lines. But it seems like lines affecting the position of other lines on canvas. So I need to add different z-index values to all lines. Is there any way to draw lines with different z-index so they do not affect the position of other lines. Or is there any other method available to draw lines, like to draw text I have replaced DrawText method with TextBlock . Below is the sample code I am using right now: DrawingGroup dGroup = new