以下是显示项目文件夹Assets in
中图片的2行String path = Directory.GetCurrentDirectory() + @"\Assets";
myFlipView.ItemsSource = Directory.GetFiles(path).Select(p => "ms-appx:///"+ p);
在同样的想法中,我想将几张图片添加到我的flipView中,但它是在共享文件中
myFlipView.ItemsSource = Directory.GetFiles(http://localhost/Pictures)。 图片是包含图片的文件夹,其编号可以更改 如何将其添加到myFlipView.ItemsSource
答案 0 :(得分:0)
as getFiles implements ILISt as long as the method GetFiles returns a list of strings for example I did that
List<string> myPathListPictures=new List<string>();
myPathListPictures = GetPictures();
fv.ItemsSource = myPathListPictures.Select(p=> "Http://localhost" + p);