# Windows 8 Metro app, How to set a click event for different images that are loaded?

**URL:** https://forum.kirupa.com/t/windows-8-metro-app-how-to-set-a-click-event-for-different-images-that-are-loaded/331496
**Category:** programming
**Created:** [August 12, 2013, 6:49pm UTC](https://forum.kirupa.com/t/windows-8-metro-app-how-to-set-a-click-event-for-different-images-that-are-loaded/331496 "2013-08-12T18:49:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Matt\_Brooking](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@Matt\_Brooking](https://forum.kirupa.com/u/Matt_Brooking)
#### Post date: [August 12, 2013, 6:49pm UTC](https://forum.kirupa.com/t/windows-8-metro-app-how-to-set-a-click-event-for-different-images-that-are-loaded/331496/1 "2013-08-12T18:49:47Z")

</div>

[COLOR=#333333][FONT=Arial]Im developing an windows 8 metro app in c# and xaml

I’ve created a drag and drop function in my app which i’ve used a code sample and works ok. The images need to have a click event, so ive used the tapped event. However I need the event to have a different result.

[/FONT][/COLOR][COLOR=#333333][FONT=Segoe UI]I need to be able to define these images loaded via the c# separately, [/FONT][/COLOR][COLOR=#333333][FONT=Segoe UI]So i can then apply the tapped event to each image.[/FONT][/COLOR][COLOR=#333333][FONT=Arial]

[/FONT][/COLOR]

```auto
   protected override void OnNavigatedTo(NavigationEventArgs e) {
            source.Add(new Item("Assets/Achord.png"));
            source.Add(new Item("Assets/Bchord.png"));
            source.Add(new Item("Assets/Cchord.png"));
            source.Add(new Item("Assets/Dchord.png"));
            source.Add(new Item("Assets/Echord.png"));
            source.Add(new Item("Assets/Fchord.png"));
            source.Add(new Item("Assets/Gchord.png"));
            availableItems.ItemsSource = source;
            chosenItems.ItemsSource = destination;

        }

```

[COLOR=#333333][FONT=Arial]  
[/FONT][/COLOR]
