[IronPython] loading an image in silverlight, in xaml, from the .xap

Jimmy Schementi Jimmy.Schementi at microsoft.com
Mon Aug 4 23:40:26 CEST 2008


> -----Original Message-----
> From: users-bounces at lists.ironpython.com [mailto:users-
> bounces at lists.ironpython.com] On Behalf Of Dan Eloff
> Sent: Sunday, August 03, 2008 2:13 PM
> To: Discussion of IronPython
> Subject: Re: [IronPython] loading an image in silverlight, in xaml,
> from the .xap
>
> It loads the image in IE7 just fine, which is better than I ever got
> it to do. It must be the use of LoadComponent?

Yep, LoadComponent actually has knowledge of the XAP file and looks in there to resolve URLs first. XamlReader.Load doesn't know about the XAP, so it never looks in there.

> Does that mean that it never works when using XamlReader.Load ?
> Because I could never get that to work, and that's a major problem.
> Everything in my interface except the root element is either created
> in code or with XamlReader.Load. From what I gather, that means I
> cannot put images, fonts, etc in my xap file.

It does seem like a stupid limitation, so let me poke around and see if there's a solution.

> Thanks for taking the time to look into this.
>
> -Dan

FYI, I make a C# app that works fine in FF3, so it may be my fault. Again, I'll put this on my todo list. Even better, if you make sure to log a bug on codeplex.com/sdlsdk, I'll be sure to get to it.

~js

> On Thu, Jul 31, 2008 at 3:39 AM, Jimmy Schementi
> <Jimmy.Schementi at microsoft.com> wrote:
> > Dan,
> >
> > http://silverlight.net/forums/p/17003/76203.aspx#76203
> >
> > You're definitely not doing anything wrong. Here's a repro of your
> issue:
> >
> > http://jimmy.schementi.com/silverlight/xaml-image-bug/
> >
> > The crazy thing is this only repros in Firefox3, and is perfectly
> fine in IE8! Even crazier, I just made a C# project with the
> Silverlight VS tools, and it worked both in FF3 and IE8, ugh. There's
> nothing fundamentally different about the 2, so I'm a little confused.
> I'm trying to make a minimal C# repro and figure out who to blame, me
> or the SL team. =P
> >
> > ~js
> >
> >> -----Original Message-----
> >> From: users-bounces at lists.ironpython.com [mailto:users-
> >> bounces at lists.ironpython.com] On Behalf Of Dan Eloff
> >> Sent: Friday, July 11, 2008 11:53 PM
> >> To: Discussion of IronPython
> >> Subject: [IronPython] loading an image in silverlight, in xaml, from
> >> the .xap
> >>
> >> I cannot load an image from in the xap file via uri.
> >>
> >> This one has been bugging me for a long time now. I think it must
> have
> >> something to do with a difference between a Chiron xap and a VS
> built
> >> xap.
> >>
> >> Could someone on the silverlight team (Jimmy!) please take a look at
> >> the demo project and tell me what I'm doing wrong?
> >>
> >> http://silverlight.net/forums/t/17003.aspx
> >>
> >> Thanks,
> >> -Dan
> >> _______________________________________________
> >> Users mailing list
> >> Users at lists.ironpython.com
> >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.ironpython.com
> > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
> >
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list