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
Most   Popular
Upcoming Events

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.