IMetadataInfo.IconUri

Mar 26, 2008 at 6:37 PM
For starters, I'm not convinced this property should exist. If IMetadataInfo is a core prism interface then I'd prefer to see it slimmer. That said, if it does stay I'd prefer it be defined as:

public ImageSource Icon { get; }
This will allow you to use any WPF image as the icon rather than only those that can be loaded via a URI. Here's a concocted use case: modules are stored in a DB and their images are stored in a separate field so that the image can be updated independently of the module (and maybe change on a per-user basis). Therefore, it would be nice to be able to suck the image straight from the DB into an ImageSource and assign that directly.

Regards,
Kent