加载整个ListView的背景,并得到各列表项内的UIControl [英] load the entire ListView in background and get an UIControl inside each ListItem

查看:258
本文介绍了加载整个ListView的背景,并得到各列表项内的UIControl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要完全加载ListView和获得每个列表项内的UIControl即使在屏幕上不显示项目视图。

I need to load a ListView entirely and get an UIControl inside each ListItem even if the item view is not displayed on the screen.

我试图ChildViewAdded事件,但只有当被显示在屏幕上的列表项它被抬起。

I tried the ChildViewAdded event, but it is raised only when the ListItem is displayed on the screen.

所以,我需要一种方法来$ P $显示之前编程ppare我的UI的ListView。

So, I need a way to prepare my UI ListView programmatically before displaying it.

在此先感谢您的帮助。

推荐答案

快速的答案 - 如果你需要在列表中的每个项目一个真正的视图那么你不希望使用虚拟化控制像一个ListView

Quick answer - if you need a real View for each item in your list then you don't want to use a virtualized control like a ListView.

相反,你可以使用滚动型内垂直的LinearLayout内重复自定义视图。

Instead you can use repeated custom views inside a vertical LinearLayout inside a ScrollView.

如果使用mvvmcross,你会发现一个MVXBindableLinearLayout有助于做到这一点 - 它有一个的ItemsSource和模板就像MvxBindableListView

If using mvvmcross, you may find a MVXBindableLinearLayout helpful to do this - it has an ItemsSource and a Template just like the MvxBindableListView.

我不知道是否你正在尝试做的是有意义的,但上面的应该,如果你想帮你做吧!

I've no idea whether what you are trying to do makes sense, but the above should help you do it if you want to!

不要试图采用线性布局,有很多项目列表 - 你会耗尽资源

Don't try using a linear layout for lists with lots of items - you'll run out of resources.

这篇关于加载整个ListView的背景,并得到各列表项内的UIControl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆