0

I'm not able to get crisp icons in a WPF project. I've tried several solutions but the results are terrible when the icons are downscaled. The starting files are .ai (Illustrator) that I've exported to xaml code using Expression Design Here is an example blurry icons example

gfields
  • 17
  • 6

1 Answers1

0

First of all, you can try to play with properties SnapsToDevicePixels and UseLayoutRounding.

Next, please check what coordinates your vector images use. In order to get the sharp lines, you must either move your coordinate system to (0.5, 0.5) or use half-integer coordinates (e.g. 0.5, 2.5, 11.5).

Please, have a look at this MSDN topic. There is also a perfect article on this topic. It's in Russian, but you can try to use Google Translate for it.

Pavel
  • 910
  • 5
  • 6
  • Thanks for the links, the translation from Russian is not always easy to understand, but I think this is one of the best articles on this topic. Unfortunately I'm not sure if I've understood your suggestion on the half-integer coordinate system: when I export the icon from Illustrator to xaml, should I change all the coordinates of the resulting path to .5? It's a huge work... – gfields Mar 24 '17 at 14:40