Click here to Skip to main content
15,881,852 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Pete O'Hanlon30-May-11 23:05
mvePete O'Hanlon30-May-11 23:05 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
_Maxxx_31-May-11 13:16
professional_Maxxx_31-May-11 13:16 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Pete O'Hanlon31-May-11 21:37
mvePete O'Hanlon31-May-11 21:37 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Mycroft Holmes31-May-11 13:14
professionalMycroft Holmes31-May-11 13:14 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
_Maxxx_31-May-11 13:27
professional_Maxxx_31-May-11 13:27 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
Mycroft Holmes31-May-11 14:30
professionalMycroft Holmes31-May-11 14:30 
GeneralRe: How to pass a new instance of a viewmodel to an existing usercontrol? Pin
_Maxxx_31-May-11 15:59
professional_Maxxx_31-May-11 15:59 
QuestionHow to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Vimalsoft(Pty) Ltd26-May-11 0:18
professionalVimalsoft(Pty) Ltd26-May-11 0:18 
Good Day All

I have a Generic function that in my Static Class. i have this Class in Silverlight
public static BitmapSource LoadImage(Byte[] imageBytes)
    {
        BitmapImage bmpImage = new BitmapImage();
        MemoryStream mystream = new MemoryStream(imageBytes);
        bmpImage.SetSource(mystream);
        return bmpImage;
    }


Now this looked fine for me until i had to bind an Image in Silverlight like this

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

<Image x:Name="PhotoHolder" Height="98" Width="102" OpacityMask="Black"  Canvas.Left="141" Canvas.Top="30">
            <Image.Effect>
                <DropShadowEffect/>
            </Image.Effect>
        </Image>


so if i bind i get this Error
Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))


Thanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

QuestionRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Mark Salsbery26-May-11 11:10
Mark Salsbery26-May-11 11:10 
AnswerRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Vimalsoft(Pty) Ltd26-May-11 11:13
professionalVimalsoft(Pty) Ltd26-May-11 11:13 
GeneralRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Mark Salsbery26-May-11 11:39
Mark Salsbery26-May-11 11:39 
GeneralRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Vimalsoft(Pty) Ltd26-May-11 19:04
professionalVimalsoft(Pty) Ltd26-May-11 19:04 
GeneralRe: How to Convert Byte Array to BitmapSource in C# for Silverlight Pin
Mark Salsbery26-May-11 19:09
Mark Salsbery26-May-11 19:09 
QuestionHow to retrieve hyperlink url from selection text in wpf? Pin
John-ph25-May-11 23:06
John-ph25-May-11 23:06 
QuestionInstaller for WPF Control Pin
Prasoon Chaudhary25-May-11 21:22
Prasoon Chaudhary25-May-11 21:22 
AnswerRe: Installer for WPF Control Pin
Wayne Gaylard25-May-11 21:32
professionalWayne Gaylard25-May-11 21:32 
QuestionRe: Installer for WPF Control Pin
Prasoon Chaudhary25-May-11 22:09
Prasoon Chaudhary25-May-11 22:09 
AnswerRe: Installer for WPF Control Pin
Abhinav S26-May-11 7:55
Abhinav S26-May-11 7:55 
QuestionHow to Access a Cookie Created in Silverlight from an Asp.net page Pin
Vimalsoft(Pty) Ltd25-May-11 5:29
professionalVimalsoft(Pty) Ltd25-May-11 5:29 
AnswerRe: How to Access a Cookie Created in Silverlight from an Asp.net page Pin
Pete O'Hanlon25-May-11 6:25
mvePete O'Hanlon25-May-11 6:25 
GeneralRe: How to Access a Cookie Created in Silverlight from an Asp.net page Pin
Vimalsoft(Pty) Ltd25-May-11 7:18
professionalVimalsoft(Pty) Ltd25-May-11 7:18 
GeneralRe: How to Access a Cookie Created in Silverlight from an Asp.net page Pin
Pete O'Hanlon25-May-11 9:06
mvePete O'Hanlon25-May-11 9:06 
GeneralRe: How to Access a Cookie Created in Silverlight from an Asp.net page Pin
Mycroft Holmes25-May-11 12:03
professionalMycroft Holmes25-May-11 12:03 
GeneralRe: How to Access a Cookie Created in Silverlight from an Asp.net page Pin
Vimalsoft(Pty) Ltd6-Jun-11 4:55
professionalVimalsoft(Pty) Ltd6-Jun-11 4:55 
QuestionSilverlight and subdomains Pin
Mycroft Holmes24-May-11 22:44
professionalMycroft Holmes24-May-11 22:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.