artem-zinnatullin / jet-image-loader

WP7+ fast and powerfull image loader with memory and storage caching for your projects!
Apache License 2.0
44 stars 14 forks source link

[feature] Loading images from resources #21

Open Nearga opened 10 years ago

Nearga commented 10 years ago
  1. If value = "/Resources/Image/MyImage.png" (or whatever), it would be loaded and rendered.
  2. If string is null, it would load temporary image (Constants.RESOURCE_IMAGE_EMPTY_PRODUCT = "/Resources/Image/DummyImage.png")
Nearga commented 10 years ago

Actually, you can also add to line 36.

        imageUri = String.IsNullOrEmpty(value as string) 
                    ? new Uri(Constants.RESOURCE_IMAGE_EMPTY_PRODUCT, UriKind.Relative) 
                    : new Uri((string)value);

For handling, if string is empty.

Nearga commented 10 years ago

Fixed usage of imageUri.Scheme for Relative cases (somehow, sometimes it throws exception, now it is fixed).

Nearga commented 10 years ago

Cleaner code.