TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Matthew Brooking
NA
2
3k
Load Images as Buttons/add Click event to Image
Aug 5 2013 10:21 AM
Hi there,
Im developing an app for Windows 8 store in Visual Studio 2012 using C# and XAML.
The page I'm currently working on has a drag and drop feature, the drag and drop works more or less fine however, I need the images to have a click event however I am unsure of how to go about it.
I want to be able to either:
a)Load the images as a button add the click event this way.
b)or being able to add a click event to the image (of which i've tried and i'm either doing it wrong or can't be done).
this is the code loading the images from the assets folder in my project.
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;
}
Thanks in advance
Reply
Answers (
0
)
Create a EXE File in C# Windows Application
Steps to follow while developing a live project