How to convert Base64 string to image, then bind it to GridView in a Metro Style App?
问题 I have collection of products from web service, I preview this product in Grid View, but I get the images of the products as Base64 strings. How can I convert it to images and bind it to the images in the Grid View? Any piece of code that will help me in this issue. 回答1: In WPF/Metro/Silverlight, Image is a UI control. Its source is set to BitmapSource. BitmapSource is a data structure to hold image data. Following is the code to retrieve BitmapImage from byte array. public BitmapImage