Dan Soltesz
Check me out on the web at Dan Soltesz -blog | .NET geek in disguise.
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Silverlight TV 11: Dynamically Loading XAPs with MEF
Mar 04, 2010 at 11:24 AMRan into an issue with composition happening more than once for a given element and that's because I was using page navigation and if the user navigated to a page, navigated away and then return to page, I was trying to load xap again. So what I did is made a change to the AddXap method to check if the aggregateCatalog already contains the deploymentCatalog
public void AddXap(string uri)
{
DeploymentCatalog catalog;
if (!_catalogs.TryGetValue(uri, out catalog))
{
catalog = new DeploymentCatalog(uri);
catalog.DownloadAsync();
_catalogs[uri] = catalog;
}
if (!_aggregateCatalog.Catalogs.Contains(catalog))
{
_aggregateCatalog.Catalogs.Add(catalog);
}
}