Issue with ComposeExportedValue

I have a 2 simple silverlight applications hosted under 2 different virtual directories. The Main application has a ContentControl inside which I am exporting the Second applications xap using an DeploymentCatalog.

In the second app (which exports itself as typeof(UserControl)) I have a property with the import tag on it as follows

It downloads the xap perfectly in the content control and it sets the value of Prop1 in it to 123.

Now I need to be able to change the value of Prop1 from the Main application. For that I have a button in the Main application, clicking on which it calls this

CatalogService.GetContainer().ComposeExportedValue("Prop1", 456);

Now what's happening is Prop1 seems to be getting updated as 0 instead of 456 with no errors whatsoever. Is this not permitted in MEF? I had to work around it by using dynamic variable and the setting the Prop1 value straight by obtaining the exported UserControl
from the CompositionContainer.

I want to avoid this. Is there a better way to handle this? Would this involve getting rid of the xap and downloading it again and passing the new value?

When you called ComposeExportedValue("Prop1", 456) you didn't replace the "Prop1" contact you actually added another instance of the "Prop1" contract. Your Prop1 property was set to 0 because you enabled AllowDefault=true and
in that case if more than on exists it sets it to default instead of one of the values.

Honestly the easiest way to do what you want is to introduce one more layer of indirection. Something like: