I am binding my images which are coming from server in the listview .These images are bitmap images. When I click on any of the image from the listview I want it to open in the default Image-Viewer on Windows. Any way to achieve this ?
Asked
Active
Viewed 1,357 times
1
-
5`Process.Start(imagepath)` should do it. – Sriram Sakthivel Mar 03 '16 at 07:22
-
That is your answer ... Repost it and accept it :P – Felix D. Mar 03 '16 at 07:30
-
Possible duplicate of [Open an image with the Windows default editor in C#](http://stackoverflow.com/questions/16022188/open-an-image-with-the-windows-default-editor-in-c-sharp) – B.K. Mar 03 '16 at 08:14
-
2Possible duplicate of http://stackoverflow.com/questions/6808029/open-image-in-windows-photo-viewer – B.K. Mar 03 '16 at 08:16
1 Answers
2
If there is a default viewer, there should be an association for the extension of the file. As a result, you can just shell-start the file. Use Process.Start
like,
System.Diagnostics.Process.Start("imagePath");

itzmebibin
- 9,199
- 8
- 48
- 62