我正在尝试在WPF(C#)中画一条线。我用Line
来做。图片如下:
如您所见,线条有硬边。我该如何解决这个问题?
这是我的代码:
<Canvas RenderOptions.BitmapScalingMode="Unspecified" RenderOptions.EdgeMode="Aliased" >
<Line RenderOptions.EdgeMode="Unspecified" X1="10" Y1="60" X2="570" Y2="570" Stroke="White" StrokeThickness="4" Width="341" Canvas.Left="203" Height="505" Canvas.Top="66" />
</Canvas>