Skip to main content
Home Forums Silverlight Programming Visual Studio & Silverlight Development Tools Silverlight - Get images as stream from file server
4 replies. Latest Post by hariram.p@live.in on March 9, 2009.
(0)
Rajeev_BV
Member
8 points
22 Posts
01-06-2009 5:54 AM |
I have a file server conatining DICOM(image) files. I need to connect to that server & get all the images as stream. the images will be residing on a path on the file server. How do I do this in SIlverlight?
Thanks,
Rajeev
preishuber
Contributor
3570 points
655 Posts
01-06-2009 6:44 AM |
to get something as stream (also image) use webclient and openreadcompleted event
Private Sub Button_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Dim req As New WebClient AddHandler req.OpenReadCompleted, AddressOf fertig req.OpenReadAsync(New Uri("ppedv.jpg", UriKind.Relative))End Sub
Public Sub fertig(ByVal sender As Object, ByVal e As OpenReadCompletedEventArgs) Dim st As Stream = e.Result Dim img As BitmapImage = New BitmapImage() img.SetSource(e.Result) image1.Source = img End Sub
Rajeev BV
17 points
38 Posts
01-06-2009 10:37 AM |
But I need to get all the images in the folder. If all the images exist in images folder, I need to get all those & get them as stream
01-06-2009 10:56 AM |
there is no "list driectory on server" function.
1) use a webmethod and implement it
2) enable directory listing in iis (if no default document is displayed) and parse the result
hariram....
181 points
50 Posts
03-09-2009 1:41 PM |
Hi,
Creat a web service you give list with custom object to list directory structure like List<String>. In this you can add the directory list from DirectoryInfo.GetFiles()
and bind the service with Silverlight List control. In the list control use SelectionChanged to show the image in different size.
Thanks