S
<Image Source = 'Example.jpg'/> (XAML or C #)
My intention now is to insert a button that selects a random image from the list for viewing.
My idea was to use a foreach loop to sort the images in an internal List . However, I would have to know for which path the images are stored.
In a Windows Forms application I would have tried to do that with the help of
DirectoryInfo folderpath = new DirectoryInfo(Environment.CurrentDirectory);
This works in Xamarin Forms but unfortunately not.
Incidentally, I saved these pictures in the solution under Android / Resources / drawable. As I said, I do not get it programmatically (in the C # code) to access it.
For help in this regard, I would be very grateful!