Silverlight XAML Primer 10, Listing 4

Handling the Downloader’s Completed event and access .ZIP file contents.

function onCompleted(sender, eventArgs)
{
    var control = sender.GetHost();
    var root = control.Content.Root;
    // Parse and load XAML from inside the .ZIP file
    var tbDownload = control.Content.CreateFromXamlDownloader(
      sender, "DownloadComplete.xaml");
    tbDownload["Canvas.Top"] = "50";
    // Add the downloaded content to the root Canvas
    root.Children.Add(tbDownload);
}
comments powered by Disqus

Featured

Subscribe on YouTube