Silverlight path blurred - How to snap to pixels?

I have a Canvas on which I draw a Path :

 <Path Data="M 380 110 v -10 l 100 -100" Stroke="#C0C0C2" StrokeThickness="1" UseLayoutRounding="True" /> 

Even if StrokeThickness set to 1, the vertical part of the path is drawn 2 pixels and has a lighter color.

Silverlight path

I know that WPF has a SnapsToDevicePixels property that would fix it, and I read that Silverlight has 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 draw this line correctly?

+7
source share
1 answer

MSDN has a pixel snapper class on the Dave Relyea Silverlight Blog . This is what I used in the past to anchor Silverlight pixels.

+2
source

All Articles