简体   繁体   English

Xamarin形成水平列表视图,显示来自ObservableCollection的图像

[英]Xamarin forms Horizontal listview showing images from ObservableCollection

I want to display Images/Thumbnails of photos that I've been taking in a horizontal view as a part of my content page. 我想将我一直在水平视图中拍摄的照片的图像/缩略图显示为内容页面的一部分。 I've stored the images paths as strings in a ObservableCollection. 我已经将图像路径作为字符串存储在ObservableCollection中。 What's the best approach to do this in XAML and PCL. 在XAML和PCL中执行此操作的最佳方法是什么? Would be great if 3 or something images are shown on the screen, and standard image if no images have been added or if string is null, and to have these in a scrollview or listview so that all of the images in the ObservableCollection could be displayed. 如果在屏幕上显示3张图像或其他图像,如果没有添加图像或字符串为null,并且将它们放在滚动视图或列表视图中,以便可以显示ObservableCollection中的所有图像,则为标准图像,如果为标准图像,那会更好。

maybe something like this 也许像这样

/Oliver /奥利弗

Use Bindable (Horizontal) Scroll View. 使用可绑定(水平)滚动视图。 see this link it's help you. 看到此链接可以为您提供帮助。

http://www.fabiocozzolino.eu/a-little-and-simple-bindable-horizontal-scroll-view/ http://www.fabiocozzolino.eu/a-little-and-simple-bindable-horizo​​ntal-scroll-view/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM