MY TASK:
I have ListBox and Grid.
1. ListBoxSource and 2. GridDetails (with 2 columns and 2 rows) (This can be change to anything)
Now, all I want is to display the images in a ListBox (ListBoxSource) from a folder named “MyImages” and then I want those selected images from the ListBoxSource to TRANSFER into another ListBox (ListBoxDetails) or Grid or whatever control that can handle it AND places the selected images to another directory called “MySelectedImages”
My Problem:
– Base on my scenario,
HOW will I display/show my selected images to my Grid (define with 2 columns and 2 rows (total 4 cells)) and fill or add each cell with the selected image.
Can someone show me some solution code or link related to my problem? I will try to study it.
I do have only basic learnings of C# and XAML. (I’m using Blend most of the time)
It sounds like you want to create a
DataTemplatefor the items inside yourListBoxcontrol. See here for information on how to go about creating aDataTemplate. You then want to have some collection of images that you can build when reading from the folder and pass that collection to yourListBox‘sItemsSourceproperty. Refer to this StackOverflow question for more details on how to go about implementing this set up.