Good Day All
I have a Generic function that in my Static Class. i have this Class in Silverlight
Now this looked fine for me until i had to bind an Image in Silverlight like thisCode:public static BitmapSource LoadImage(Byte[] imageBytes) { BitmapImage bmpImage = new BitmapImage(); MemoryStream mystream = new MemoryStream(imageBytes); bmpImage.SetSource(mystream); return bmpImage; }
PhotoHolder.Source =GenericMethods.LoadImage(model.imbPhoto);
The Images i have in the Database are Supported by silverlight they are jpg type.
and the Elelment that i am binding to look like this in Silverlight
so if i bind i get this ErrorCode:<Image x:Name="PhotoHolder" Height="98" Width="102" OpacityMask="Black" Canvas.Left="141" Canvas.Top="30"> <Image.Effect> <DropShadowEffect/> </Image.Effect> </Image>
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
Thanks


Reply With Quote