public void Load(Uri source)
{
// Setup initial conditions.
if (source == null) return;
// Load the HTML content.
var webClient = new WebClient();
webClient.DownloadStringCompleted += (s, e) =>
{
if (e.Error != null)
{
Debug.WriteLine(string.Format("HtmlBlock Load Error: Failed to load HTML contained in an XML document at '{0}'.", source));
Debug.WriteLine(e.Error.Message);
return;
}
InnerHtml = e.Result;
};
webClient.DownloadStringAsync(source);
}
#endregion