I am dynamically adding a bunch of files to a bunch of Panels
in my Form
.
When I show the OpenFileDialog
, I allow the user to select a file. When the user selects a file, I would like to:
a) If the file is an image, display a thumbnail of that image in the Panel, and
b) If the file is _not_ an image, display its File Icon in the Panel.
I am also having trouble understanding how to differentiate between an Image
file and a normal file
(without doing a massive IF
statement for all the different image types. Is that how you would do it?)
How can we do this? I have searched but I have not found anything that helped explain how to approach this.