Silverlight Icons: Images vs. Vectors

I love using the Expression Blend vector drawing feature to create icons. This way I can change colors easily on my icons without having to go to an image editor.

But my question is ... Let's say I have a TreeView control that has an icon next to each tree item and says that I have hundreds of items. Do you think using images is faster - performance is wiser than using vector icons? B / c I'd rather use vectors, but I'm curious about performance issues.

+2


a source to share


2 answers


Whenever you create vector graphics that are static, use CacheMode to at least reduce the amount of math required to handle the specified graphics (unless Silverlight uses a GPU and relies on rendering software to do such tasks).

That being said, look for the Bitmap approach as much as you can as it reduces the CPU tax, but obviously more tax in the load balancing process :(

A good article can be found here:




http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2009/04/16/silverlight-3-and-gpu-acceleration.aspx




Scott Barnes

(Former Silverlight Product Manager)

+2


a source


Yes, it is probably faster to have small bitmap icons. But this is also possibly casually faster. WPF itself uses small vectors for things like "+" and "-" views if you break templates. It's designed to handle things like this. I also prefer using vector icons.

The only other issue you are likely to run into is "fuzziness", it's just the nature of vector graphics, but with icons, it allows each pixel to be explicitly drawn and rendered exactly and therefore slightly less blurry. The downside is, of course, if you need it to display at any other size, it looks much worse.



You just need to weigh the trade-offs.

+1


a source







All Articles