Silverlight MEF Embedded Resources

Posted by Fastidious on Stack Overflow See other posts from Stack Overflow or by Fastidious
Published on 2010-04-14T01:56:23Z Indexed on 2010/04/14 2:03 UTC
Read the original article Hit count: 398

Filed under:
|

I have two different Silverlight UserControls imported with MEF from two different xaps. The UserControls are simply an Image on a Canvas. Both UserControls have the image marked as 'Resource'. The images are different but their names are the same (key point). I'm not quite sure what's going on behind the scenes of the MEF import but both images seem to end up in the same AppDomain. After the composition when I stick the UserControls on a Canvas, each is an instance of the class it should be, but they both show the same image.

Obviously if the image file names are unique across all xaps I import I have no problem but I don't like that solution. Is there a better one?

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about MEF