I have a Canvas
onto which I draw a Path
:
<Path Data="M 380 110 v -10 l 100 -100"
Stroke="#C0C0C2" StrokeThickness="1" UseLayoutRounding="True" />
Even though the StrokeThickness
is set to 1, the vertical part of the path is drawn across 2 pixels and in a lighter color.
I know that WPF has the SnapsToDevicePixels
property that would fix it, and I read that in Silverlight there is a UseLayoutRounding
property that you can use in some cases to have the same effect, however it does not seem to apply to Path
.
Is there anything I can do to get that line drawn properly?
There is a pixel snapper class over at MSDN on Dave Relyea's Silverlight Blog. That is what I have used in the past for Silverlight pixel snapping.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With