[IronPython] No OpenReadCompleted Event for WebClient in Silverlight 2

Michael Foord fuzzyman at voidspace.org.uk
Wed Mar 12 00:17:07 CET 2008

Hello guys,

With the following code executed in Silverlight2 I find I get the 
'DownloadProgressChanged' event fired 3 times and the 
'OpenReadCompleted' not at all. :-(

The changed event shows 100% completed every time it is fired...

from System import Uri, UriKind
from System.Net import WebClient

uri = Uri('/', UriKind.Relative)
web = WebClient()

def completed(s, e):
    print 'Completed'
    print e.Error
    print e.Cancelled
    print e.Result

def changed(s, e):
    print 'Bytes Recieved', e.BytesReceived
    print 'Progress Percentage', e.ProgressPercentage

web.OpenReadCompleted += completed
web.DownloadProgressChanged += changed

Anyone got any clues?



More information about the Ironpython-users mailing list