Click here to Skip to main content
15,885,546 members
Home / Discussions / WPF
   

WPF

 
GeneralOverview: WPF Pin
Kamal Gurnani22-May-09 0:44
Kamal Gurnani22-May-09 0:44 
GeneralRe: Overview: WPF Pin
Pete O'Hanlon22-May-09 0:58
mvePete O'Hanlon22-May-09 0:58 
GeneralRe: Overview: WPF Pin
Allen Anderson25-May-09 17:49
Allen Anderson25-May-09 17:49 
QuestionInteroperability: Form vs. Window Pin
Kunal Chowdhury «IN»21-May-09 23:24
professionalKunal Chowdhury «IN»21-May-09 23:24 
AnswerRe: Interoperability: Form vs. Window Pin
Pete O'Hanlon22-May-09 0:27
mvePete O'Hanlon22-May-09 0:27 
AnswerRe: Interoperability: Form vs. Window Pin
#realJSOP22-May-09 0:30
mve#realJSOP22-May-09 0:30 
AnswerRe: Interoperability: Form vs. Window Pin
ABitSmart22-May-09 3:53
ABitSmart22-May-09 3:53 
GeneralSilverlight 2: Code: 4001. Category: ImageError. Message: AG_E_NETWORK_ERROR Pin
SBJ21-May-09 11:48
SBJ21-May-09 11:48 
I've noticed a lot of posts on various blogs, etc about this error when referencing image files. Apparently it means that Silverlight can't find your file, or Silverlight doesn't support the format (.gif).

I think like most people experimenting with Silverlight, I haven't formally studied the language, and so I miss many nuances. Here is one where I'm sure it is documented somewhere but I had to learn the hard way.

I had a situation where I was loading an array of image names to be used as a series of ImageBrush elements, so I added the image files to the Properties folder through Blend, and reference them in my code-behind, as...

"Properties/MyImage.png"

however Silverlight didn't recognize them. I had other images referenced the same way in the XAML code and Silverlight had no problem.

It turns out that if you reference an image file (or I assume any other Resource) in the XMAL, Silverlight compiles the Resource into the App.DLL. If they are only referenced in the code-behind this is not the case, so you must include a copy of the Properties folder relative to where the XAP file is run; in this case off my Bin directory.

Hopefully this post will help others avoid my time consuming mistake,
Steve
GeneralRe: Silverlight 2: Code: 4001. Category: ImageError. Message: AG_E_NETWORK_ERROR Pin
Mark Salsbery22-May-09 6:12
Mark Salsbery22-May-09 6:12 
GeneralRe: Silverlight 2: Code: 4001. Category: ImageError. Message: AG_E_NETWORK_ERROR Pin
SBJ22-May-09 6:48
SBJ22-May-09 6:48 
GeneralRe: Silverlight 2: Code: 4001. Category: ImageError. Message: AG_E_NETWORK_ERROR Pin
Mark Salsbery22-May-09 7:04
Mark Salsbery22-May-09 7:04 
GeneralRe: Silverlight 2: Code: 4001. Category: ImageError. Message: AG_E_NETWORK_ERROR Pin
SBJ22-May-09 7:41
SBJ22-May-09 7:41 
GeneralRe: Silverlight 2: Code: 4001. Category: ImageError. Message: AG_E_NETWORK_ERROR Pin
Mark Salsbery22-May-09 8:07
Mark Salsbery22-May-09 8:07 
GeneralRe: Silverlight 2: Code: 4001. Category: ImageError. Message: AG_E_NETWORK_ERROR Pin
SBJ22-May-09 10:32
SBJ22-May-09 10:32 
GeneralRe: Silverlight 2: Code: 4001. Category: ImageError. Message: AG_E_NETWORK_ERROR Pin
Mark Salsbery22-May-09 10:39
Mark Salsbery22-May-09 10:39 
QuestionM-V-VM implementation question Pin
ml_black21-May-09 9:48
ml_black21-May-09 9:48 
AnswerRe: M-V-VM implementation question Pin
Pete O'Hanlon21-May-09 10:33
mvePete O'Hanlon21-May-09 10:33 
GeneralRe: M-V-VM implementation question Pin
ml_black22-May-09 2:32
ml_black22-May-09 2:32 
GeneralRe: M-V-VM implementation question Pin
Pete O'Hanlon22-May-09 3:15
mvePete O'Hanlon22-May-09 3:15 
GeneralRe: M-V-VM implementation question Pin
ml_black22-May-09 4:14
ml_black22-May-09 4:14 
Questionprogramming html in wpf using c# Pin
ramakrishnamakkena21-May-09 2:40
ramakrishnamakkena21-May-09 2:40 
AnswerRe: programming html in wpf using c# Pin
Pete O'Hanlon21-May-09 4:32
mvePete O'Hanlon21-May-09 4:32 
QuestionListViewItem promblem Pin
mildred-frontfree21-May-09 0:57
mildred-frontfree21-May-09 0:57 
AnswerRe: ListViewItem promblem Pin
ABitSmart21-May-09 5:13
ABitSmart21-May-09 5:13 
GeneralRe: ListViewItem promblem Pin
mildred-frontfree21-May-09 18:14
mildred-frontfree21-May-09 18:14 

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.