JOHN JOHNNNY

JOHN JOHNNNY

  • NA
  • 190
  • 139.7k

Dynamically creating an event handler

Nov 11 2014 12:05 PM

Hello

From the code below, how can i create an event handler for each image i.e whenever the user tap on an image it will take them to details page of each image

//PART-1
// Declareing a Generic List
List<binderClass> myList = new List<binderClass>();

//PART-2
myList.Add(new binderClass() { imageLocation = @"Assets\polnews1.jpg", displayName = "CitizenNews" });
myList.Add(new binderClass() { imageLocation = @"Assets\polnews2.jpg", displayName = "CitizenNews" });
myList.Add(new binderClass() { imageLocation = @"Assets\polnews3.jpg", displayName = "CitizenNews" });

//PART-3
binderClass binder1 = new binderClass();
binder1.displayName = "CitizenNews";
binder1.imageLocation = @"Assets\polnews4.jpg";
myList.Add(binder1);
//PART-4
// ASSIGN the object to TAGRET List
designerListBox.ItemsSource = myList;

Reply soon and thanks in advance