I’m kinda new at both programming, and WPF. I know that this is pretty easy, but I nothing I’ve tried as worked so far…..
I want to fill a Listbox with images from a folder. I also need to know how to force my listbox from allowing scrolling to the side. So far I haven’t stumbled upon anything that seems to work.
Here is my C# code that adds the files in chosen folder to a List Basically I want the Listbox to be use to keep a history log of the pictures that the user has chosen as backgrounds.
IList<Bitmap> HistoryImages = new List<Bitmap>();
foreach(String imagefile in Directory.GetFiles( @"C:\ProgramData\etc" ))
{
HistoryImages.Add( new Bitmap( imagefile) );
}
Found something that worked for me!
XAML Code:
C# Code: