0
Reply

Dynamically creating an event handler

JOHN JOHNNNY

JOHN JOHNNNY

Nov 11 2014 12:05 PM
551

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