Hi,
Can I load pictures via LoadImageFromUrl from a local disk without async methods?
The code below works, but it works poorly and often the images do not load, or not all are loaded.
Uri uri = new Uri(Path.Combine(Holder.TempPath, e.Url), UriKind.Absolute);
WebClient client = new WebClient();
client.OpenReadCompleted += (w, a) =>
{
if(a.Error == null)
{
try
{
e.ImageElement.Init(a.Result, new Telerik.WinControls.RichTextEditor.UI.Size(16, 16), extension);
}
catch
{
//Handle errors
}
}
};
client.OpenReadAsync(uri);