Effectively Using Icons and Images

Effective use of icons and images throughout your application can really enhance its visual appeal. Designing quality icons is really the job of a graphics designer, but if you don't have the budget for a graphics designer, there is still the viable and relatively inexpensive option of purchasing a stock icon library. Most libraries come as raster files, such as .png files, although some companies are starting to include, or sell separately, the original vector images.

images Note While .png files work perfectly well in Silverlight, in some instances, you may prefer to use vector (XAML#8211;based) images instead. Vector images are scalable without losing quality, can be modified easily, and often have a smaller file size than the equivalent raster image, depending on the complexity of the image. However, vector images are also more CPU intensive, so you need to choose the appropriate format for your particular requirements. As a general rule, for small images that don't need to be scaled, such as icons, raster images are a better choice. For large images, especially those that will change size, vector images may suit better.

Note that vector graphics often come as Adobe Photoshop (.psd), Adobe Illustrator (.ai), or Scalable Vector Graphics (.svg) files and need to be converted to XAML, possibly losing some definition along the way, to be used within a Silverlight application. A plug-in is available for Adobe Illustrator to export to XAML, or you can open these files from within Expression Blend, using the File images Import Adobe Illustrator File menu option, or Expression Design, using File images Open. Opening .ai files in Expression Design is a little more successful but often results in black shapes where Expression Design couldn't render the corresponding element correctly, most likely due to using rendering features not available in Silverlight. Ideally, you want the icons and images already converted to XAML files when you purchase them to save you these problems.

If you do buy icons or images formatted as XAML, ensure that they are formatted for Silverlight, not WPF. The file formats differ slightly, so if they are formatted for WPF, they will not be usable in Silverlight without modification. That said, if the Expression Design file type is also included, you can use that to export a new XAML file targeting Silverlight instead.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset