tags:

views:

18

answers:

1

Hello,

I have the following XAML code:

<Path Data="M0,0 L 12 0 L 12 12 L 0 12 Z M 6 0 L 6 12 M 0 6 L 12 6" StrokeDashArray="1 1" Stroke="Black" StrokeThickness="1" SnapsToDevicePixels='True">
</Path>

However it looks horribly fuzzy on my screen. Is there a solution?

+1  A: 

If you just want a crisp, dashed path and you may be able to get the results you want by declaring the RenderOptions.EdgeMode as Aliased to prevent the framework from interpolating the path outline when a dash falls between pixel boundaries:

<Path Data="M0,0 L 12 0 L 12 12 L 0 12 Z M 6 0 L 6 12 M 0 6 L 12 6" StrokeDashArray="1 1" Stroke="Black" StrokeThickness="1" RenderOptions.EdgeMode="Aliased">
</Path>
C8H10N4O2