从列表视图中获取文本 [英] get text from the listview

查看:86
本文介绍了从列表视图中获取文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过此链接中的教程制作了自定义列表视图

http://www.coderzheaven.com/2012/03/23/how-to-create-a-custom-listbox-in-windows-phone-7 / [ ^ ]



我需要的是我想在点击时获取每一行的标题和副标题一排特别的。是否有任何方法来获取文本而不从提供它的数组中获取它。

I made a custom listview from the tutorial in this link
http://www.coderzheaven.com/2012/03/23/how-to-create-a-custom-listbox-in-windows-phone-7/[^]

and My need is I want to get the title and subtitle of each row when clicking on a particular row. Is there any way to get the text without taking it from the array from which it is supplied.

推荐答案

您需要将ListView绑定到对象的集合(ViewModels) )并向要查询的模型添加属性,例如Text。
You need to bind the ListView to a collection of objects (ViewModels) and add properties to those models that you wish to query, such as the Text.


这篇关于从列表视图中获取文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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