views:

14

answers:

1

I would like to make an image viewer where the client can load thumbnails to a file, then when the Photo Gallery button is selected the thumbnails appear in a grid and when the thumbnail is selected a larger photo will show in a viwbox. How do I get the path for the button click event to the photos? Can this be done in a markup ext?

A: 

I assume you already have thumbnails created on the file system, something like this:

\Folder\Image1.png
\Folder\Image1-Thumb.png
\Folder\Image2.png
\Folder\Image2-Thumb.png

I would load that into a list of a custom class, maybe a ViewModel that had two properties for Image and ImageThumb -- then you can setup WPF Bindings accordingly.

Nate Bross
thank you Nate, I'm not really sure how to set up the folder because the user will add the photos at runtime.
Betsy
Folder is simply a place-holder. As long as you have a database of where every 'main' image is, you can generate a thumbnail right next to it and store that in your database as well.
Nate Bross