C#/WPF: Display Images like a LightBox in jQuery?

c#, jquery, lightbox, wpf

Solution

Here is a site that appears to have done it, but it is only version 0.5 and might change dramatically before 1.0: http://leandrovieira.com/projects/jquery/lightbox/#

This should be what you're looking for, and here is a sample of their code to implement:

$(function() {
    $('#gallery a').lightBox({fixedNavigation:true});
});

I hope this helps,

Thanks!

EDIT:

Sorry that I didn't fully understand what you ment in version one of your question. Here is an updated answer (with code / source) to your question.

First I created a control that will act as a modal dialog box that grays everything out in the background. Then I added the ability to put a picture in there, with added ability to have a comment with each picture. Here are images of the final product:

First Image Loaded: First Image Loaded http://img682.imageshack.us/img682/8941/firstpictureopen.jpg

Second Image Fading In: Second Image Fading In http://img5.imageshack.us/img5/3172/secondpicturefading.jpg

Second Image Loaded: Second Image Loaded http://img682.imageshack.us/img682/5404/secondpictureopen.jpg

I also added animations to resize the images like the Lightbox project does. I added the ability to have a forward and back buttons, accelerator keys, forward and back arrow control, and escape to exit. I think I've captured what you're looking for in this control.

As usual, I've uploaded the full source code to Google Code for your download.

The direct link to the zip file is here: http://stackoverflow-answers-by-scott.googlecode.com/files/1755872.zip

I hope this helps,

Thanks!

Problem

Did anyone ever try to create a jQuery "LightBox"-Like "Popup" (WPF UserControl) for displaying Images? See this page for an example: http://www.huddletogether.com/projects/lightbox2/ Thanks!

Original source