Terence Tsang demonstrated how to load an external assembly library (Usually a dll or xap file) into your own Silverlight application. This is a very effective method to minimize the application file size.
Loading external library in C#:
WebClient downloader = new WebClient();
downloader.OpenReadCompleted += new OpenReadCompletedEventHandler(onDownloadCompleted);
downloader.OpenReadAsync(new Uri(DLL_PATH, UriKind.Absolute));
// Once the assembly is downloaded
private void onDownloadCompleted(object o, OpenReadCompletedEventArgs args)
{
try
{
AssemblyPart ap = new AssemblyPart();
Assembly assembly = ap.Load(args.Result);
Object control = assembly.CreateInstance(CLASS_NAME);
}
catch (Exception e){}
}
Download: http://www.shinedraw.com/?dl_id=97

